-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #341 from codeforjapan/develop
update some translate & fix some bug
- Loading branch information
Showing
10 changed files
with
184 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/* Fix https://github.com/codeforjapan/decidim-cfj/issues/288 */ | ||
.comment__content { | ||
overflow-wrap: break-word; | ||
word-wrap: break-word; | ||
} |
29 changes: 29 additions & 0 deletions
29
app/controllers/concerns/decidim/proposals/cookie_orderable.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# frozen_string_literal: true | ||
|
||
module Decidim | ||
module Proposals | ||
module CookieOrderable | ||
private | ||
|
||
def default_order | ||
order_by_cookie || super | ||
end | ||
|
||
def order_by_cookie | ||
cookie = cookies[order_cookie_name] | ||
cookie if cookie && available_orders.include?(cookie) | ||
end | ||
|
||
def order_cookie_name | ||
"proposal_default_order" | ||
end | ||
|
||
def detect_order(candidate) | ||
detected = available_orders.detect { |order| order == candidate } | ||
cookies[order_cookie_name] = detected if detected | ||
|
||
detected | ||
end | ||
end | ||
end | ||
end |
95 changes: 0 additions & 95 deletions
95
app/views/decidim/proposals/admin/proposals/_form.html.erb
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/bash | ||
# | ||
# A script for retrieving user data from the decidim database | ||
# You need to set below environment variables before running this script | ||
# | ||
# export RDS_DB_NAME=ebdb | ||
# export RDS_PASSWORD=password | ||
# export RDS_HOSTNAME=database-host | ||
# export RDS_USERNAME=decidimapp | ||
# | ||
|
||
function print_orgs() { | ||
export PGPASSWORD=$RDS_PASSWORD; psql -h $RDS_HOSTNAME -U $RDS_USERNAME -c "SELECT id, name FROM decidim_organizations" $RDS_DB_NAME | ||
} | ||
|
||
if [ "$1" = "" ]; then | ||
print_orgs | ||
echo "-------------------" | ||
echo "please specify ORG_ID ; get_user_data.sh ORG_ID" | ||
exit 1 | ||
fi | ||
|
||
echo ORG_ID is $1 | ||
ORG_ID=$1 | ||
|
||
out_file=$(mktemp) | ||
json_file=$(mktemp) | ||
|
||
|
||
echo "[" > ${json_file} | ||
export PGPASSWORD=$RDS_PASSWORD; psql -h $RDS_HOSTNAME -U $RDS_USERNAME -c "SELECT json_build_object('id', B.id, 'nickname',nickname,'email', email, 'created_at', to_char(B.created_at, 'YYYY/MM/DD'),'sign_in_count', sign_in_count, 'last_sign_in_at', to_char(last_sign_in_at, 'YYYY/MM/DD'), 'data', metadata) FROM public.decidim_authorizations as A RIGHT OUTER JOIN decidim_users as B on A.decidim_user_id = B.id where decidim_organization_id = ${ORG_ID} and B.deleted_at is null;" -A -t $RDS_DB_NAME > ${out_file} | ||
|
||
awk -v eof=`wc -l ${out_file} | awk '{print $1}'` 'BEGIN{ORS = ",\n"}{if (NR==eof) ORS=""; print $0}' ${out_file} >> ${json_file} | ||
echo "]" >> ${json_file} | ||
|
||
|
||
echo "id, created_at, sign_in_count, last_sign_in, nickname, real_name, email, gender, address, birth_year, occupation" > /tmp/metadata.csv | ||
|
||
cat ${json_file} | jq -r '.[] | [.id,.created_at, .sign_in_count,.last_sign_in_at,.nickname,.data.real_name, .email, .data.gender, .data.address, .data.birth_year, .data.occupation] | @csv' >> /tmp/metadata.csv | ||
|
||
echo "/tmp/metadata.csv is created" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# frozen_string_literal: true | ||
|
||
# Override Decidim::Orderable | ||
# | ||
# Use cookies to store default orders | ||
# | ||
Rails.application.config.to_prepare do | ||
Decidim::Proposals::ProposalsController.prepend Decidim::Proposals::CookieOrderable | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
decidim-user_extension/app/views/decidim/devise/registrations/_user_extension.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# 更新作業について | ||
|
||
このインスタンスはDecicim本体に依存しており、Decidimが更新された場合、それに合わせて更新作業を行う必要があります。 | ||
|
||
## Decidimの更新方法 | ||
|
||
基本的な手順は https://docs.decidim.org/en/install/update/ に書いてある通りです。 | ||
|
||
## Decidim本体のバージョン更新時に特に注意したい内容 | ||
|
||
Decidim本体のバージョンを更新する際、特に注意が必要な内容についてまとめておきます。 | ||
|
||
### 上書き用のファイル・ディレクトリ | ||
|
||
このDecidimアプリ内で、Decidim本体やライブラリに含まれる元ファイルを上書きしているファイルがいくつかあります。 | ||
これらのファイルについては、Decidim本体のファイルがバージョンアップ時に更新された場合、その更新内容をファイルに反映させなければアプリケーションが壊れる可能性があります。そのため、本体の更新時には確認が必要です。 | ||
|
||
* `app/assets/javascripts/decidim/decidim_awesome/editors/legacy_quill_editor.js.es6` | ||
|
||
QuillエディタでHTML編集ができるようにするために追加されたファイル。現在はDecidim Awesome対応になっています(decidim_awesome内の`app/assets/javascripts/decidim/decidim_awesome/editors/legacy_quill_editor.js.es6`がベースになっています)。 | ||
|
||
* `app/assets/stylesheets/buttons.scss` | ||
|
||
`https://github.com/codeforjapan/decidim-cfj/issues/46` の対応で `https://github.com/codeforjapan/decidim-cfj/pull/96` で追加しています。 | ||
|
||
* `app/assets/stylesheets/decidim/decidim_awesome/editors/quill_editor.scss` | ||
|
||
Decidim Awesomeを追加した際に https://github.com/codeforjapan/decidim-cfj/pull/223 で上書きしています。 | ||
|
||
* `app/commands/decidim/admin/process_participatory_space_private_user_import_csv.rb` | ||
|
||
https://github.com/codeforjapan/decidim-cfj/issues/202 の対応のため追加したファイル。 | ||
|
||
https://github.com/decidim/decidim/pull/7781 で本家にフィードバックしたので、これが取り込まれたバージョン(v0.25.0以降)になればファイルごと削除できるはずです。 | ||
|
||
* `app/forms/decidim/proposals/proposal_wizard_create_step_form.rb`, `app/forms/decidim/proposals/admin/proposal_form.rb` | ||
|
||
https://github.com/codeforjapan/decidim-cfj/issues/23 の対応のために追加されたもの。対応するPRは https://github.com/codeforjapan/decidim-cfj/pull/60 https://github.com/codeforjapan/decidim-cfj/pull/163 です。 | ||
EtiquetteValidatorは修正が入っているので戻せるかもしれませんが、8文字程度のタイトルでも許可するようにする修正はフィードバックできていません。 | ||
|
||
* `decidim-comments` | ||
|
||
https://github.com/codeforjapan/decidim-cfj/issues/319 などの対応のために追加されたディレクトリ(gem)。 | ||
|
||
本家の https://github.com/decidim/decidim/tree/develop/decidim-comments から切り出して修正を加えたもの。 | ||
バージョンアップ時には注意しつつ、変更点を適宜修正する必要があります。 | ||
|
||
* `app/helpers/decidim/resource_versions_helper.rb` | ||
|
||
高速化のために https://github.com/codeforjapan/decidim-cfj/pull/289 で追加されたファイル。 | ||
|
||
https://github.com/decidim/decidim/pull/8393 でフィードバック済みなので、取り込まれたバージョンでは削除できます。 | ||
|
||
* `app/uploaders/decidim/application_uploader.rb` | ||
|
||
https://github.com/decidim/decidim/issues/6720 や https://github.com/codeforjapan/decidim-cfj/issues/101 などの対応のために導入。 | ||
|
||
* `app/views/decidim/application/_collection.html.erb` | ||
|
||
https://github.com/codeforjapan/decidim-cfj/issues/192 の対応で https://github.com/codeforjapan/decidim-cfj/pull/210 で追加しています。 | ||
本家の https://github.com/decidim/decidim/pull/7418 で対応済みなので、取り込まれたバージョンでは削除できます。 | ||
|
||
* `app/views/decidim/blogs/posts/show.html.erb` | ||
|
||
https://github.com/codeforjapan/decidim-cfj/issues/107 の対応として https://github.com/codeforjapan/decidim-cfj/pull/126 で追加しています。 | ||
|
||
|
||
* `app/views/decidim/proposals/admin/proposals/_form.html.erb` | ||
|
||
https://github.com/codeforjapan/decidim-cfj/issues/24 の対応として https://github.com/codeforjapan/decidim-cfj/pull/51 で追加しています。 | ||
本家には https://github.com/decidim/decidim/issues/6739 でフィードバック済で、再現まではできていたようですが、修正されたかどうかは不明です。 | ||
|
||
* `app/views/layouts/decidim/_main_footer.html.erb` | ||
|
||
https://github.com/codeforjapan/decidim-cfj/issues/101 の対応として https://github.com/codeforjapan/decidim-cfj/pull/108 で追加しています。 | ||
ダウンロードに問題がなければ削除しても大丈夫かと思われます。 |