Skip to content

Commit c35e16a

Browse files
Fix English translations not used despite being preferred (#3822)
When specifying the preferred language on Linux, the $LANGUAGE env var is used. https://www.gnu.org/software/gettext/manual/html_node/The-LANGUAGE-variable.html Example: $ LANGUAGE=en:nl flameshot Expected: flameshot should be in English as this is a localization that flameshot provides. If English would not be supported, it should fall back to using Dutch (nl). Actual: flameshot uses Dutch translations. Cause: If an empty translation file for "en" is not provided, English is only used as a fallback. See https://bugreports.qt.io/browse/QTBUG-69196
1 parent 54644df commit c35e16a

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!DOCTYPE TS>
3+
<!--
4+
An empty translation file is required for the base language, or it will only be used as a
5+
fallback if the user prefers other supported languages. E.g.
6+
$ LANGUAGE=en:nl flameshot
7+
will result in Dutch translations being used despite English being higher priority.
8+
See https://bugreports.qt.io/browse/QTBUG-69196
9+
-->
10+
<TS version="2.1" language="en">
11+
</TS>

src/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ set(FLAMESHOT_TS_FILES
103103
${CMAKE_SOURCE_DIR}/data/translations/Internationalization_cs.ts
104104
${CMAKE_SOURCE_DIR}/data/translations/Internationalization_de_DE.ts
105105
${CMAKE_SOURCE_DIR}/data/translations/Internationalization_el.ts
106+
${CMAKE_SOURCE_DIR}/data/translations/Internationalization_en.ts
106107
${CMAKE_SOURCE_DIR}/data/translations/Internationalization_es.ts
107108
${CMAKE_SOURCE_DIR}/data/translations/Internationalization_eu.ts
108109
${CMAKE_SOURCE_DIR}/data/translations/Internationalization_fa.ts

0 commit comments

Comments
 (0)