瀏覽代碼

CMakeLists: Ensure proper numerusform tags are generated for pluralized translations

If we don't set an explicit source and target language for the base
english translation, then we'll generate an incorrect number of
<numerusform> tags (which Transifex doesn't like).
Lioncash 5 年之前
父節點
當前提交
6fef91ce4c
共有 1 個文件被更改,包括 8 次插入1 次删除
  1. 8 1
      src/yuzu/CMakeLists.txt

+ 8 - 1
src/yuzu/CMakeLists.txt

@@ -182,7 +182,14 @@ if (ENABLE_QT_TRANSLATION)
     # Update source TS file if enabled
     if (GENERATE_QT_TRANSLATION)
         get_target_property(SRCS yuzu SOURCES)
-        qt5_create_translation(QM_FILES ${SRCS} ${UIS} ${YUZU_QT_LANGUAGES}/en.ts)
+        qt5_create_translation(QM_FILES
+            ${SRCS}
+            ${UIS}
+            ${YUZU_QT_LANGUAGES}/en.ts
+        OPTIONS
+            -source-language en_US
+            -target-language en_US
+        )
         add_custom_target(translation ALL DEPENDS ${YUZU_QT_LANGUAGES}/en.ts)
     endif()