|
| 1 | +# Contributing to the CodeIgniter 4 translations |
| 2 | + |
| 3 | +We welcome contributions, to the *develop* branch, |
| 4 | + to add new translations or update existing ones. |
| 5 | + |
| 6 | +If you have a translation or correction, please fork the repository, clone it |
| 7 | +locally, and then create a new branch (from develop) |
| 8 | +for each set of related changes or for |
| 9 | +a complete language pack. Once your branch is complete, *then* create a pull |
| 10 | +request to merge it into the develop branch of this repository. |
| 11 | + |
| 12 | +If you are contributing a variant of a main locale (e.g. "en-CA"), you |
| 13 | +only need to provide those translations that differ from it. |
| 14 | + |
| 15 | +Each translation set would go inside a folder named following the two-letter ISO-639-1 language code. |
| 16 | +Localization variants would have folders named with the two-letter ISO 639-1 language code in lowercase, |
| 17 | +followed by the two-letter ISO 3166 country code capitalized, |
| 18 | +and with the two parts separated by a hyphen. |
| 19 | +An example would be "en" for English, and "en-US" for the variations appropriate to the United States. |
| 20 | + |
| 21 | +Pull requests to the repository will only be considered if they come from |
| 22 | +the maintainer for any translations in the request, or if the maintainer |
| 23 | +adds a comment indicating they approve of any changes. |
| 24 | +If a maintainer is unresponsive, or we have a contribution for a new |
| 25 | +language, we can add the contributor as a maintainer for that language. |
| 26 | + |
| 27 | +PR conversations should be conducted in English, thanks. |
| 28 | + |
| 29 | +## Process |
| 30 | + |
| 31 | +We would like to see GPG-signed commits for contributions, |
| 32 | +and we have unit testing to help determine if your translations are complete. |
| 33 | + |
| 34 | +The unit testing looks for translation sets missing language settings that |
| 35 | +are in the framework repository's `app/Language/en folder`, and for settings |
| 36 | +in a translation set that are not in that folder. |
| 37 | + |
| 38 | +The unit testing is expected to fail, unless all translation sets are totally |
| 39 | +in synch with the framework's. Look for your language set in the travis-ci |
| 40 | +details for your pull request. |
| 41 | + |
| 42 | +For instance, a travis-ci excerpt showing that the `fa` translation is missing |
| 43 | +a specific set of messages: |
| 44 | + |
| 45 | + 12) CodeIgniter\Language\TranslationsTest::testExtraFiles with data set "fa" ('fa') |
| 46 | + fa has extra files: Filter.php |
| 47 | + |
| 48 | +This was caused by `Filters.php` incorrectly named `Filter,php`. |
| 49 | + |
| 50 | +An example showing missing keys for the `sk` translation set: |
| 51 | + |
| 52 | + 10) CodeIgniter\Language\TranslationsTest::testMissingFiles with data set "sk" ('sk') |
| 53 | + sk is missing: RESTful.php Email.php Encryption.php |
| 54 | + |
| 55 | +These would be caused by message sets added to the framework but not here. |
| 56 | + |
| 57 | +And an example showing extra keys for the `it` translation set: |
| 58 | + |
| 59 | + 33) CodeIgniter\Language\TranslationsTest::testExtraKeys with data set "it" ('it') |
| 60 | + it has extra keys: Files.invalidFilename Files.cannotCopy Images.unsupportedImagecreate |
| 61 | + |
| 62 | +This would be caused by messages removed or renamed in the framework, and not reflected here. |
0 commit comments