Skip to content
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

Localize redactor #417

Closed
wants to merge 20 commits into from
Closed

Conversation

mlocati
Copy link
Contributor

@mlocati mlocati commented Jul 11, 2014

To be able to localize Redactor with the current $this->requireAsset('redactor'); we need to update the redactor asset group.
So, in this pull request we have:

  1. Some PRS-2 coding style fixes
  2. Implemented assets de-registrations (when switching from a language to another one we have to reset the components of the redactor asset)
  3. Added a new asset type: InlineJavascriptAsset. This is required since to activate a language we have to write a line of code like `$.Redactor.opts.lang = 'language code';``
  4. Added (and normalized) the Redactor language files
  5. Update the 'redactor' asset group when setting/switching a language

@Remo
Copy link
Contributor

Remo commented Jul 11, 2014

where did you get those js translations? There are two mistakes in the German translation file

align_center: 'Mitte',
center: 'Center'

should probably be:

align_center: 'Zentrieren',
center: 'Zentriert'

Redactor language files may miss some strings: let's use the English ones
in that case.
@mlocati
Copy link
Contributor Author

mlocati commented Jul 11, 2014

where did you get those js translations?

From here: http://imperavi.com/redactor/docs/languages/

@mlocati
Copy link
Contributor Author

mlocati commented Jul 11, 2014

There are two mistakes in the German translation file

Fixed 😉

@mlocati mlocati mentioned this pull request Jul 11, 2014
@mlocati
Copy link
Contributor Author

mlocati commented Jul 11, 2014

#419 is a simpler approach and can be integrated in Transifex (Redactor language files contains errors and are hard to maintain).

@mlocati mlocati closed this Jul 11, 2014
@mlocati mlocati deleted the localize-redactor branch July 11, 2014 12:57
@mlocati mlocati mentioned this pull request Jul 11, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants