Changeset - 36a36ebdf4bb
[Not reviewed]
tip stable
0 1 0
Mads Kiilerich - 3 years ago 2022-12-12 22:24:50
mads@kiilerich.com
Grafted from: 0c9c91ac3873
i18n: prevent msgmerge fuzzy matching - it is too random
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
scripts/i18n_utils.py
Show inline comments
 
@@ -165,13 +165,13 @@ def _normalize_po(raw_content):
 
            continue
 
        chunks.append('\n'.join(chunk_lines) + '\n')
 
    return '\n'.join(chunks)
 

	
 
def _normalize_po_file(po_file, merge_pot_file=None, strip=False):
 
    if merge_pot_file:
 
        runcmd(['msgmerge', '--width=76', '--backup=none', '--previous',
 
        runcmd(['msgmerge', '--width=76', '--backup=none', '--previous', '--no-fuzzy-matching',
 
                '--update', po_file, '-q', merge_pot_file])
 
    if strip:
 
        po_tmp = po_file + '.tmp'
 
        with open(po_file, 'r') as src, open(po_tmp, 'w') as dest:
 
            raw_content = src.read()
 
            normalized_content = _normalize_po(raw_content)
0 comments (0 inline, 0 general)