refactor(i18n): make Dominican Spanish standalone
Validate Tryton customizations / validate (pull_request) Successful in 3m33s
Validate Tryton customizations / validate (push) Successful in 3m39s

Remove the es_419 parent from the es_DO language record and provide the complete core ir catalog so the Dominican locale is independently maintained in core and every module.
This commit is contained in:
José Arturo García
2026-10-13 20:09:26 -04:00
parent 4038053504
commit e22c0497bd
4 changed files with 4818 additions and 14 deletions
+9 -9
View File
@@ -36,12 +36,12 @@ organization grants that token read-only cross-repository access to
## Translation workflow
The Tryton server owns the `es_DO` language and declares `es_419` as its
fallback. Dominican translations live beside each package in its regular
`locale/es_DO.po` catalog. The catalogs are initially bootstrapped from
`es_419` so Weblate exposes the complete vocabulary for review; subsequent
Dominican terminology is maintained directly in those catalogs. There is no
duplicated localization module or runtime dependency on one.
The Tryton server owns `es_DO` as a standalone language; its database record
does not declare `es_419` (or any other locale) as parent. Complete Dominican
translations live beside each package in its regular `locale/es_DO.po`
catalog. The initial catalogs were bootstrapped from `es_419`, but they are now
independent and Dominican terminology is maintained directly in them. There is
no duplicated localization module or runtime dependency on one.
Weblate must push through a dedicated `translation/weblate-8.0` branch and a
reviewed pull request to `integration/8.0`; it must never push directly to a
@@ -56,9 +56,9 @@ When a catalog changes, update the database with:
trytond-admin -d DATABASE --all --activate-dependencies
```
Activate Spanish, Spanish (Latin American), and Spanish (Dominican Republic)
as translatable languages in that order. Then update the activated modules to
import any new `es_DO.po` catalogs delivered by Weblate.
Activate Spanish (Dominican Republic) as a translatable language, then update
the activated modules to import any new `es_DO.po` catalogs delivered by
Weblate. Activating Spanish (Latin American) is not required for `es_DO`.
## Resolving an upstream conflict
-1
View File
@@ -154,7 +154,6 @@ this repository contains the full copyright notices and license terms. -->
<record model="ir.lang" id="lang_es_DO">
<field name="code">es_DO</field>
<field name="name">Spanish (Dominican Republic)</field>
<field name="parent">es_419</field>
<field name="nplurals" eval="2"/>
<field name="plural">n != 1</field>
<field name="date">%d/%m/%Y</field>
File diff suppressed because it is too large Load Diff
+3 -4
View File
@@ -18,7 +18,7 @@ except ImportError:
from dateutil.relativedelta import relativedelta
from trytond.ir.exceptions import SequenceAffixError
from trytond.ir.lang import _replace, get_parent_language
from trytond.ir.lang import _replace
from trytond.pool import Pool
from trytond.pyson import Eval, If, PYSONEncoder
from trytond.tools import timezone
@@ -359,15 +359,14 @@ class IrTestCase(ModuleTestCase):
@with_transaction()
def test_dominican_spanish_language(self):
"Dominican Spanish is provided by the server with Latin fallback"
"Dominican Spanish is provided by the server as a standalone language"
pool = Pool()
Lang = pool.get('ir.lang')
language = Lang.get('es_DO')
self.assertEqual(language.code, 'es_DO')
self.assertEqual(language.parent, 'es_419')
self.assertEqual(get_parent_language(language.code), 'es_419')
self.assertIsNone(language.parent)
@with_transaction()
def test_lang_currency(self):