Backport offccfd36e05,4ba7fbbf81and1421949c67to saas-11.3 [FIX] tools: use pot as reference file In the first attempt at #26134, the pot_targets was cleared after creating the pot_rows object. Since the rows not present in the pot_targets are now skipped, clearing the pot should not be done. Still use a temporary list pot_rows to avoid modifying the list we are iterating on. Update the .po test file to match the new file format [FIX] tools: import translation file without pot Due tofccfd36and4ba7fbbthe translations were only imported, considering the .pot as the reference. During import or a manual csv or po file, there is no pot file. Add tests with Klingon and Dothraki
21 lines
601 B
Python
21 lines
601 B
Python
# -*- coding: utf-8 -*-
|
|
|
|
from odoo import models, fields, _
|
|
|
|
class m(models.TransientModel):
|
|
""" A model to provide source strings. """
|
|
_name = 'test.translation.import'
|
|
|
|
name = fields.Char('1XBUO5PUYH2RYZSA1FTLRYS8SPCNU1UYXMEYMM25ASV7JC2KTJZQESZYRV9L8CGB',
|
|
size=32, help='Efgh')
|
|
other_name = fields.Char('Test translation with two code type and model')
|
|
|
|
_('Ijkl')
|
|
|
|
# With the name label above, this source string should be generated twice.
|
|
_('1XBUO5PUYH2RYZSA1FTLRYS8SPCNU1UYXMEYMM25ASV7JC2KTJZQESZYRV9L8CGB')
|
|
|
|
_('Klingon')
|
|
|
|
_('Accounting')
|