Skip to content
Snippets Groups Projects
Commit 9c7fb721 authored by Denis Ledoux's avatar Denis Ledoux
Browse files

[FIX] translate: allow common english 2 chars terms

Before, all isolated (between xml/html tags) two chars words coming from views were not translated (by choice).
But, for some words, allowing them is useful. For instance, the word 'or' located between two buttons.

opw-616716
parent 35431de1
No related branches found
No related tags found
No related merge requests found
......@@ -137,6 +137,9 @@ _LOCALE2WIN32 = {
}
# These are not all english small words, just those that could potentially be isolated within views
ENGLISH_SMALL_WORDS = set("as at by do go if in me no of ok on or to up us we".split())
class UNIX_LINE_TERMINATOR(csv.excel):
lineterminator = '\n'
......@@ -676,7 +679,7 @@ def trans_generate(lang, modules, cr):
def push(mod, type, name, res_id, term):
term = (term or '').strip()
if len(term) > 2:
if len(term) > 2 or term in ENGLISH_SMALL_WORDS:
push_translation(mod, type, name, res_id, term)
def get_root_view(xml_id):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment