-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Translate user generated content #3359
Conversation
4a45255
to
d9bd7d7
Compare
d9bd7d7
to
d0e0806
Compare
d0e0806
to
ad5bbde
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some files could not be reviewed due to errors:
warning: parser/current is loading parser/ruby26, which recognizes
warning: parser/current is loading parser/ruby26, which recognizes warning: 2.6.0-dev-compliant syntax, but you are running 2.6.1. warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri. 2 error(s) were found in ERB files Linting 1 files with 12 linters...expected attribute value after '=' (at >)
In file: app/views/proposals/_form.html.erb:21
In file: app/views/proposals/_form.html.erb:33
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some files could not be reviewed due to errors:
warning: parser/current is loading parser/ruby26, which recognizes
warning: parser/current is loading parser/ruby26, which recognizes warning: 2.6.0-dev-compliant syntax, but you are running 2.6.1. warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri. 2 error(s) were found in ERB files Linting 1 files with 12 linters...expected attribute value after '=' (at >)
In file: app/views/proposals/_form.html.erb:21
In file: app/views/proposals/_form.html.erb:33
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some files could not be reviewed due to errors:
warning: parser/current is loading parser/ruby26, which recognizes
warning: parser/current is loading parser/ruby26, which recognizes warning: 2.6.0-dev-compliant syntax, but you are running 2.6.1. warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri. 2 error(s) were found in ERB files Linting 1 files with 12 linters...expected attribute value after '=' (at >)
In file: app/views/proposals/_form.html.erb:21
In file: app/views/proposals/_form.html.erb:33
After extract translation interface partials from admin folder translations should be placed in general.yml file inside shared context.
This file was used at previous version of translation interface.
In order to not allow users to remove all persited translations from any resource. A few exceptions were added: * Does not apply to globalizable models without translatable attributes required * Make a copy of main model error on current translations to be more realistic
Now we take into consideration locales persisted but marked for destruction to complete some logic and to be able to show best translations on different situations.
Only when present
When a translation not exists yet we can mark them all for destruction by default. They already should be initialized correctly from database or via nested attributes.
…nagment logic During any translatable resource edit, if you remove all translations you will be redirected to same form with errors showing you one of persisted but marked to destroy translations, without this patch _destroy field value wil be true and you will no able to persist without re-addding the same language through translation interface.
Responsive translation interface
…ations Block translatable resource updates with no translations
3dd1b7a
to
7a00590
Compare
a7475f1
to
7a00590
Compare
Thanks @Senen, @taitus, @agileontheweb awesome work! 👏 |
Translate user generated content
References
Objectives
Make all user generated content translatable.