Skip to content
Branch: master
Find file History
ddnexus refactoring of i18n:
- I18n gem compliant (removed plural keys inconsistent with the locale)
- added tests for all the pluralization procs
- simplified and normalized Pagy dictionary file
- renamed :items_Path to :colletion_key
- added :collection_key lookup for the items_selector_js helper
Latest commit 260e7d4 Apr 25, 2019
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
utils
README.md refactoring of i18n: Apr 28, 2019
de.yml
en.yml refactoring of i18n: Apr 28, 2019
es.yml refactoring of i18n: Apr 28, 2019
fr.yml refactoring of i18n: Apr 28, 2019
id.yml refactoring of i18n: Apr 28, 2019
ja.yml refactoring of i18n: Apr 28, 2019
nb.yml refactoring of i18n: Apr 28, 2019
nl.yml refactoring of i18n: Apr 28, 2019
pl.yml refactoring of i18n: Apr 28, 2019
pt-br.yml refactoring of i18n: Apr 28, 2019
ru.yml
se.yml refactoring of i18n: Apr 28, 2019
tr.yml refactoring of i18n: Apr 28, 2019
zh-CN.yml refactoring of i18n: Apr 28, 2019
zh-HK.yml refactoring of i18n: Apr 28, 2019
zh-TW.yml

README.md

Pagy locales

Please, submit your translation!

If you find that some translation could be improved, please, create an issue.

If you are using pagy with some language missing from the dictionary files, please, submit your translation!

You can create a Pull Request for your language, and get all the help you need to correctly complete it. Here is a check list.

Check list for a new dictionary file:

  • Find the pluralization rule for your language

    • find the locale file you need in the list of pluralizations and check the pluralization rule in it. For example for en.rb it is::RailsI18n::Pluralization::OneOther.with_locale(:en). Note the rule part i.e. OneOther. In pagy that translates to the symbol :one_other.
  • add/edit the first line comment in the language rule in your dictionary file (e.g. # :one_other pluralization ...

  • The mandatory pluralized entry in the dictionary file is the item_name. Please, provide all the plurals needed by your language. E.g. if your language uses the :east_slavic you should provide the plurals for one, few, many and other, if it uses :one_other, you should provide one and other plurals. If it uses :other you should only provide a single value. Look into other dictionary files to get some example. Ask if in doubt.

  • The other entries in the dictionary file don't need any plural variant in most languages since the pluralization of the item_name in the sentence is enough. However, in some language, the whole sentence needs to be written in a different way for different plurals. In that case you should add the different plurals for the sentence and they will get triggered by the count.

Feel free to ask for help in your Pull Request.

Useful Links

You can’t perform that action at this time.