Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • D Dev Documentation
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • crnd-public
  • Dev Documentation
  • Wiki
  • Development Process

Development Process · Changes

Page history
Update Development Process authored Jan 21, 2019 by karavaiev's avatar karavaiev
Hide whitespace changes
Inline Side-by-side
Development-Process.md
View page @ 959b3d52
...@@ -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
Clone repository
  • CI Review App
  • Development Process
  • File Templates
    • .gitignore
    • gitlab ci.yml
    • odoo packager.yml
  • Odoo Packager
  • Set up develpment environment
  • Useful Links
  • Home
  • Процеси
    • Процес створення нового модуля в новому репозитарії
  • Тестові задачі
    • KPI
    • OKR
    • Weather Measurement
    • Робоче місце охорони