diff options
author | Simon Frei <freisim93@gmail.com> | 2021-07-22 11:47:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-22 11:47:03 +0200 |
commit | cb26552440ebf60c366d2f9299e7d46e4850ddac (patch) | |
tree | 20e5d2eac87548a1a25b0b2f5fd5d1e6d98f4b61 /script | |
parent | 1ae5ac7d0bfb0bd94f3d7feb90e0abb8a4973a51 (diff) | |
download | syncthing-cb26552440ebf60c366d2f9299e7d46e4850ddac.tar.gz syncthing-cb26552440ebf60c366d2f9299e7d46e4850ddac.zip |
gui, script: Fix various gui string/translation issues (fixes #7839) (#7842)
Diffstat (limited to 'script')
-rw-r--r-- | script/translate.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/script/translate.go b/script/translate.go index a6b459ea9..928068b5d 100644 --- a/script/translate.go +++ b/script/translate.go @@ -20,12 +20,12 @@ import ( ) var trans = make(map[string]string) -var attrRe = regexp.MustCompile(`\{\{'([^']+)'\s+\|\s+translate\}\}`) -var attrReCond = regexp.MustCompile(`\{\{.+\s+\?\s+'([^']+)'\s+:\s+'([^']+)'\s+\|\s+translate\}\}`) +var attrRe = regexp.MustCompile(`\{\{\s*'([^']+)'\s+\|\s+translate\s*\}\}`) +var attrReCond = regexp.MustCompile(`\{\{.+\s+\?\s+'([^']+)'\s+:\s+'([^']+)'\s+\|\s+translate\s*\}\}`) // exceptions to the untranslated text warning var noStringRe = regexp.MustCompile( - `^((\W*\{\{.*?\}\} ?.?\/?.?(bps)?\W*)+(\.stignore)?|[^a-zA-Z]+.?[^a-zA-Z]*|[kMGT]?B|Twitter|JS\W?|DEV|https?://\S+)$`) + `^((\W*\{\{.*?\}\} ?.?\/?.?(bps)?\W*)+(\.stignore)?|[^a-zA-Z]+.?[^a-zA-Z]*|[kMGT]?B|Twitter|JS\W?|DEV|https?://\S+|TechUi)$`) // exceptions to the untranslated text warning specific to aboutModalView.html var aboutRe = regexp.MustCompile(`^([^/]+/[^/]+|(The Go Pro|Font Awesome ).+|Build \{\{.+\}\}|Copyright .+ the Syncthing Authors\.)$`) |