... | @@ -15,35 +15,8 @@ Any code changes should pass the following stages to be merged into the main bra |
... | @@ -15,35 +15,8 @@ Any code changes should pass the following stages to be merged into the main bra |
|
- [stylelint](https://github.com/stylelint/stylelint)
|
|
- [stylelint](https://github.com/stylelint/stylelint)
|
|
- check-versions (ensure that changes to main branches will change the version of addons)
|
|
- check-versions (ensure that changes to main branches will change the version of addons)
|
|
2. Automatic tests
|
|
2. Automatic tests
|
|
- on a clean database
|
|
- on a clean database - ensure that the modified code works properly in a clean environment
|
|
- tests with the changes made (migration tests)
|
|
- tests with the changes made (migration tests) - verify that the code changes do not cause any errors
|
|
3. Automatic check of translation coverage
|
|
3. Automatic check of translation coverage
|
|
4. Automatic review app deployment
|
|
4. Automatic review app deployment
|
|
|
|
5. Manual testing and code review |
|
### Translation
|
|
|
|
|
|
|
|
For translations we use [odoo-helper-scripts](https://github.com/katyukha/odoo-helper-scripts) which have `odoo-helper tr` subcommand, that provides utils that simplifies translation process.
|
|
|
|
|
|
|
|
Command `odoo-helper tr regenerate` regenerates PO files for specifed modules.
|
|
|
|
For more info type following in command line
|
|
|
|
|
|
|
|
```bash
|
|
|
|
odoo-helper tr regenerate --help
|
|
|
|
```
|
|
|
|
|
|
|
|
this will display help message for this command.
|
|
|
|
|
|
|
|
For example, we have to translate addon `generic_request_sla` and `generic_request_sla_log` to ukrainian language, so to add translations to that addon we have follow next steps:
|
|
|
|
|
|
|
|
1. `cd repositiories/maao-generic` - go to directory of this repository
|
|
|
|
2. `git checkout 9.0 && git pull` - checkout to branch `9.0` and pull all changes for origin repository.
|
|
|
|
3. `git checkout -b 9.0-translate-request-sla` - start new branch named `9.0-translate-request-sla`
|
|
|
|
4. `odoo-helper tr regenerate --lang uk_UA --file uk generic_request_sla generic_request_sla_log` - regenerate [PO files](https://www.gnu.org/software/gettext/manual/html_node/PO-Files.html) for addons `generic_request_sla` and `generic_request_sla_log`, generated files will be `generic_request_sla/i18n/uk.po` and `generic_request_sla_log/i18n/uk.po`. In this command `uk_UA` is language to regenerate translations for, and `uk` is name of translation files. For example for `uk_UA` language, Odoo will look for `uk_UA.po` file first, and then for `uk.po` file.
|
|
|
|
5. Open `generic_request_sla/i18n/uk.po` file in your favorte text editor (for example [gedit](https://wiki.gnome.org/Apps/Gedit), [Sublime text](https://www.sublimetext.com/), etc) and edit translations. Also look here for [PO file format](https://www.gnu.org/software/gettext/manual/html_node/PO-Files.html)
|
|
|
|
6. `git diff --color` - look at your changes, review them before commit, may be you forget to translate something, or there some mistages present in diff.
|
|
|
|
7. Check your translations on your local database, if they looks realy good.
|
|
|
|
***TODO: add here more info, or add link to separate page that describes how to update translations on local database***
|
|
|
|
8. `git commit` Commit your changes, metion in commit message what addons you have translated, are this translations complete, or it is partialy translated. Note, that commit message must be in English!
|
|
|
|
9. `git push -u orgin 9.0-translate-request-sla`
|
|
|
|
10. Go to gitlab and create Merge request (`9.0-translate-request-sla` to `9.0`), wait for tests finished. If you have no finished your work, mark merge request as WIP (work in progress), to prevent it to be merged.
|
|
|
|
11. After tests complete, go to runbot, and test how your translations look. |
|
|
|
\ No newline at end of file |
|
|