Skip to content

Commit ed7cac7

Browse files
feat(gui): add Vietnamese translation
1 parent 0ce6124 commit ed7cac7

File tree

5 files changed

+1164
-18
lines changed

5 files changed

+1164
-18
lines changed

CREDITS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
- Russian: Michael Soyka
2929
- Spanish: Samuel, craftablescience
3030
- Swedish: BreakinBenny, TheDudeWhosNameIsAce
31+
- Vietnamese: Barnacl437
3132

3233
## Acknowledgements
3334
- [SourcePP](https://github.com/craftablescience/sourcepp) - craftablescience and contributors

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ Please read [this file](https://github.com/craftablescience/VPKEdit/blob/main/IN
7070
- Switch version of existing VPKs
7171
- Native Linux compatibility
7272
- User interface translated to the following languages ([support the translation effort here](https://poeditor.com/join/project/yxR9MLc9X2)):<br/>
73-
🇧🇦 🇨🇳 🇭🇷 🇳🇱 🇩🇪 🇮🇹 🇯🇵 🇰🇷 🇵🇱 🇧🇷 🇷🇺 🇪🇸 🇸🇪
73+
🇧🇦 🇨🇳 🇭🇷 🇳🇱 🇩🇪 🇮🇹 🇯🇵 🇰🇷 🇵🇱 🇧🇷 🇷🇺 🇪🇸 🇸🇪 🇻🇳
7474

7575
Please read [this file](https://github.com/craftablescience/VPKEdit/blob/main/CONTROLS.md) to see all keyboard shortcuts.
7676

src/gui/Window.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ Window::Window(QWidget* parent)
239239
{u8"Русский", "ru_RU"},
240240
{u8"Español", "es"},
241241
{u8"Svenska", "sv"},
242+
{u8"Tiếng Việt", "vi"},
242243
};
243244
for (const auto& [language, locale] : languageToLocaleMapping) {
244245
if (language.isEmpty() && locale.isEmpty()) {

src/gui/_gui.cmake

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -102,23 +102,8 @@ add_executable(${PROJECT_NAME} WIN32 ${${PROJECT_NAME}_SOURCES})
102102

103103
vpkedit_configure_target(${PROJECT_NAME})
104104

105-
qt_add_translations(${PROJECT_NAME}
106-
TS_FILES
107-
"${CMAKE_CURRENT_LIST_DIR}/res/i18n/${PROJECT_NAME}_bs_BA.ts"
108-
"${CMAKE_CURRENT_LIST_DIR}/res/i18n/${PROJECT_NAME}_de.ts"
109-
"${CMAKE_CURRENT_LIST_DIR}/res/i18n/${PROJECT_NAME}_en.ts"
110-
"${CMAKE_CURRENT_LIST_DIR}/res/i18n/${PROJECT_NAME}_es.ts"
111-
"${CMAKE_CURRENT_LIST_DIR}/res/i18n/${PROJECT_NAME}_hr.ts"
112-
"${CMAKE_CURRENT_LIST_DIR}/res/i18n/${PROJECT_NAME}_it.ts"
113-
"${CMAKE_CURRENT_LIST_DIR}/res/i18n/${PROJECT_NAME}_ja.ts"
114-
"${CMAKE_CURRENT_LIST_DIR}/res/i18n/${PROJECT_NAME}_ko.ts"
115-
"${CMAKE_CURRENT_LIST_DIR}/res/i18n/${PROJECT_NAME}_nl.ts"
116-
"${CMAKE_CURRENT_LIST_DIR}/res/i18n/${PROJECT_NAME}_pl.ts"
117-
"${CMAKE_CURRENT_LIST_DIR}/res/i18n/${PROJECT_NAME}_pt_BR.ts"
118-
"${CMAKE_CURRENT_LIST_DIR}/res/i18n/${PROJECT_NAME}_ru_RU.ts"
119-
"${CMAKE_CURRENT_LIST_DIR}/res/i18n/${PROJECT_NAME}_sv.ts"
120-
"${CMAKE_CURRENT_LIST_DIR}/res/i18n/${PROJECT_NAME}_zh_CN.ts"
121-
SOURCES ${${PROJECT_NAME}_SOURCES})
105+
file(GLOB ${PROJECT_NAME}_I18N_TS_FILES "${CMAKE_CURRENT_LIST_DIR}/res/i18n/${PROJECT_NAME}_*.ts")
106+
qt_add_translations(${PROJECT_NAME} TS_FILES ${${PROJECT_NAME}_I18N_TS_FILES} SOURCES ${${PROJECT_NAME}_SOURCES})
122107

123108
target_link_libraries(
124109
${PROJECT_NAME} PRIVATE

0 commit comments

Comments
 (0)