Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
setvisible committed Apr 1, 2023
2 parents 03511e6 + f3635d7 commit 47857c5
Show file tree
Hide file tree
Showing 38 changed files with 9,884 additions and 641 deletions.
31 changes: 16 additions & 15 deletions .tx/config
Expand Up @@ -3,25 +3,26 @@
[main]
host = https://www.transifex.com

[downzemall.main-application]
file_filter = src/locale/dza_<lang>.ts
[o:downzemall:p:downzemall:r:main-application]
file_filter = src/locale/dza_<lang>.ts
source_file = src/locale/dza_en_US.ts
source_lang = en
type = QT
minimum_perc = 0
source_file = src/locale/dza_en_US.ts
source_lang = en
type = QT
lang_map = ar_EG: ar_EG, de_DE: de_DE, en_US: en_US, es_ES: es_ES, fr_FR: fr_FR, hu_HU: hu_HU, it_IT: it_IT, ko_KR: ko_KR, nl_NL: nl_NL, pl_PL: pl_PL, pt_BR: pt_BR, pt_PT: pt_PT, ru_RU: ru_RU, zh_CN: zh_CN
lang_map = ar_EG: ar_EG, de_DE: de_DE, en_US: en_US, es_ES: es_ES, fr_FR: fr_FR, hu_HU: hu_HU, it_IT: it_IT, ja_JP: ja_JP, ko_KR: ko_KR, nl_NL: nl_NL, pl_PL: pl_PL, pt_BR: pt_BR, pt_PT: pt_PT, ru_RU: ru_RU, vi_VN: vi_VN, zh_CN: zh_CN

[downzemall.web-extension]
file_filter = web-extension/extension/src/base/_locales/<lang>/messages.json
[o:downzemall:p:downzemall:r:web-extension]
file_filter = web-extension/extension/src/base/_locales/<lang>/messages.json
source_file = web-extension/extension/src/base/_locales/en/messages.json
source_lang = en
type = CHROME
minimum_perc = 0
source_file = web-extension/extension/src/base/_locales/en/messages.json
source_lang = en
type = CHROME
lang_map = ar_EG: ar, de_DE: de, en_US: en, es_ES: es, fr_FR: fr, hu_HU: hu, it_IT: it, ko_KR: ko, nl_NL: nl, pl_PL: pl_PL, pt_BR: pt_BR, pt_PT: pt_PT, ru_RU: ru, zh_CN: zh_CN
lang_map = ar_EG: ar, de_DE: de, en_US: en, es_ES: es, fr_FR: fr, hu_HU: hu, it_IT: it, ja_JP: ja, ko_KR: ko, nl_NL: nl, pl_PL: pl, pt_BR: pt_BR, pt_PT: pt_PT, ru_RU: ru, vi_VN: vi, zh_CN: zh_CN

[downzemall.windows-installer]
[o:downzemall:p:downzemall:r:windows-installer]
file_filter = installer/windows/NSIS/i18n/sources/<lang>.json
source_file = installer/windows/NSIS/i18n/sources/en.json
source_lang = en
type = KEYVALUEJSON
lang_map = ar_EG: ar, de_DE: de, en_US: en, es_ES: es, fr_FR: fr, hu_HU: hu, it_IT: it, ko_KR: ko, nl_NL: nl, pl_PL: pl_PL, pt_BR: pt_BR, pt_PT: pt, ru_RU: ru, zh_CN: zh_CN
type = KEYVALUEJSON
lang_map = ar_EG: ar, de_DE: de, en_US: en, es_ES: es, fr_FR: fr, hu_HU: hu, it_IT: it, ja_JP: ja, ko_KR: ko, nl_NL: nl, pl_PL: pl, pt_BR: pt_BR, pt_PT: pt, ru_RU: ru, vi_VN: vi, zh_CN: zh_CN

Binary file modified 3rd/yt-dlp/bin/yt-dlp
Binary file not shown.
Binary file modified 3rd/yt-dlp/bin/yt-dlp.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion 3rd/yt-dlp/version
@@ -1 +1 @@
2022.11.11
2023.03.04
31 changes: 24 additions & 7 deletions TRANSLATORS.md
Expand Up @@ -15,9 +15,9 @@ To add the language 'xx' in country 'XX':

2. Go to Transifex > Language > Add the language > Add xx_XX

3. Add following line to `./src/src.pro`:
3. Add following line to `qt_add_translations(...)` in `./src/CMakeLists.txt`:

TRANSLATIONS += $$PWD/locale/dza_xx_XX.ts
${CMAKE_SOURCE_DIR}/src/locale/dza_xx_XX.ts

4. Add following line to `lang_map` in the Transifex config file `./.tx/config`:

Expand Down Expand Up @@ -50,9 +50,15 @@ To add the language 'xx' in country 'XX':

6. Translate (eventually)

7. Run `lupdate ./src/src.pro -noobsolete`. It recreates the *.ts.
7. To recreate the *.ts, run:

8. Run `lrelease ./src/src.pro`. It generates the *.qm.
`cmake.exe --build . --target update_translations`
(previously: `lupdate ./src/src.pro -noobsolete`)

8. To generate the *.qm, run:

`cmake.exe --build . --target release_translations`
(previously: `lrelease ./src/src.pro`)

9. 'Push' the source file and translation files to the server with TX.exe (transifex client)

Expand All @@ -62,7 +68,16 @@ To add the language 'xx' in country 'XX':

Rem: '--skip' is useful when the file has not been translated yet. indeed, empty .ts returns a server error.

10. That's it. Follow instructions in next sections to update, build and release it.
10. To recreate the *.nsh (NSIS), type:

`cd <REPO>/installer/windows/NSIS/i18n`
`python.exe ./json2nsh.py`

11. Add the language in `<REPO>/installer/windows/NSIS/setup.nsi`:

`!insertmacro LOAD_LANGUAGE XXX`

12. That's it. Follow instructions in next sections to update, build and release it.


## Translators Corner
Expand Down Expand Up @@ -119,7 +134,8 @@ Translation files can be desynchronized after an update of the C++ source code.

To resynchronize *.ts with the source code, use `lupdate` and `lrelease`:

lupdate ./src/src.pro -noobsolete
`cmake.exe --build . --target update_translations`
(previously: `lupdate <REPO>/src/src.pro -noobsolete`)

Then the *.ts files are synchronized with the C++ code.

Expand Down Expand Up @@ -162,7 +178,8 @@ At this point, *.ts files are synchronized with Transifex.

Before deploying, type:

lrelease <REPO>/src/src.pro
`cmake.exe --build . --target release_translations`
(previously: `lrelease <REPO>/src/src.pro`)


It generates *.qm (compiled translation files) to be deployed with the application.
Expand Down
10 changes: 10 additions & 0 deletions installer/windows/NSIS/i18n/out/Hungarian.nsh
@@ -0,0 +1,10 @@
LangString DESC_SectionMainApplication ${LANG_HUNGARIAN} "A főprogram."
LangString DESC_SectionLauncher ${LANG_HUNGARIAN} "Az indító, amelyet webböngészővel történő üzenetküldésre használsz."
LangString DESC_SectionStartMenuShortcut ${LANG_HUNGARIAN} "Ikon létrehozása a Start menüben"
LangString DESC_SectionDesktopShortcut ${LANG_HUNGARIAN} "Ikon létrehozása az asztalon"
LangString DESC_UninstallIconDescription ${LANG_HUNGARIAN} "A DownZemAll eltávolítása"
LangString DESC_ApplicationSession ${LANG_HUNGARIAN} "Alkalmazás (szükséges)"
LangString DESC_LauncherSession ${LANG_HUNGARIAN} "Indító (szükséges)"
LangString DESC_StartMenuGroupSession ${LANG_HUNGARIAN} "Start menü ikon"
LangString DESC_DesktopShortcutSession ${LANG_HUNGARIAN} "Asztali ikon"
LangString DESC_VisitWebSite ${LANG_HUNGARIAN} "Látogasd meg a weboldalt:"
10 changes: 10 additions & 0 deletions installer/windows/NSIS/i18n/out/Japanese.nsh
@@ -0,0 +1,10 @@
LangString DESC_SectionMainApplication ${LANG_JAPANESE} "The main application."
LangString DESC_SectionLauncher ${LANG_JAPANESE} "The launcher, used for messaging with web browser."
LangString DESC_SectionStartMenuShortcut ${LANG_JAPANESE} "Create Start Menu Shortcut."
LangString DESC_SectionDesktopShortcut ${LANG_JAPANESE} "Create Desktop Shortcut."
LangString DESC_UninstallIconDescription ${LANG_JAPANESE} "Uninstall DownZemAll"
LangString DESC_ApplicationSession ${LANG_JAPANESE} "Application (required)"
LangString DESC_LauncherSession ${LANG_JAPANESE} "Launcher (required)"
LangString DESC_StartMenuGroupSession ${LANG_JAPANESE} "Start Menu Shortcut"
LangString DESC_DesktopShortcutSession ${LANG_JAPANESE} "Desktop Shortcut"
LangString DESC_VisitWebSite ${LANG_JAPANESE} "Visit our website:"
10 changes: 10 additions & 0 deletions installer/windows/NSIS/i18n/out/Polish.nsh
@@ -0,0 +1,10 @@
LangString DESC_SectionMainApplication ${LANG_POLISH} "The main application."
LangString DESC_SectionLauncher ${LANG_POLISH} "The launcher, used for messaging with web browser."
LangString DESC_SectionStartMenuShortcut ${LANG_POLISH} "Create Start Menu Shortcut."
LangString DESC_SectionDesktopShortcut ${LANG_POLISH} "Create Desktop Shortcut."
LangString DESC_UninstallIconDescription ${LANG_POLISH} "Uninstall DownZemAll"
LangString DESC_ApplicationSession ${LANG_POLISH} "Application (required)"
LangString DESC_LauncherSession ${LANG_POLISH} "Launcher (required)"
LangString DESC_StartMenuGroupSession ${LANG_POLISH} "Start Menu Shortcut"
LangString DESC_DesktopShortcutSession ${LANG_POLISH} "Desktop Shortcut"
LangString DESC_VisitWebSite ${LANG_POLISH} "Visit our website:"
10 changes: 10 additions & 0 deletions installer/windows/NSIS/i18n/out/Vietnamese.nsh
@@ -0,0 +1,10 @@
LangString DESC_SectionMainApplication ${LANG_VIETNAMESE} "The main application."
LangString DESC_SectionLauncher ${LANG_VIETNAMESE} "The launcher, used for messaging with web browser."
LangString DESC_SectionStartMenuShortcut ${LANG_VIETNAMESE} "Create Start Menu Shortcut."
LangString DESC_SectionDesktopShortcut ${LANG_VIETNAMESE} "Create Desktop Shortcut."
LangString DESC_UninstallIconDescription ${LANG_VIETNAMESE} "Uninstall DownZemAll"
LangString DESC_ApplicationSession ${LANG_VIETNAMESE} "Application (required)"
LangString DESC_LauncherSession ${LANG_VIETNAMESE} "Launcher (required)"
LangString DESC_StartMenuGroupSession ${LANG_VIETNAMESE} "Start Menu Shortcut"
LangString DESC_DesktopShortcutSession ${LANG_VIETNAMESE} "Desktop Shortcut"
LangString DESC_VisitWebSite ${LANG_VIETNAMESE} "Visit our website:"
20 changes: 10 additions & 10 deletions installer/windows/NSIS/i18n/sources/hu.json
@@ -1,12 +1,12 @@
{
"DESC_SectionMainApplication": "The main application.",
"DESC_SectionLauncher": "The launcher, used for messaging with web browser.",
"DESC_SectionStartMenuShortcut": "Create Start Menu Shortcut.",
"DESC_SectionDesktopShortcut": "Create Desktop Shortcut.",
"DESC_UninstallIconDescription": "Uninstall DownZemAll",
"DESC_ApplicationSession": "Application (required)",
"DESC_LauncherSession": "Launcher (required)",
"DESC_StartMenuGroupSession": "Start Menu Shortcut",
"DESC_DesktopShortcutSession": "Desktop Shortcut",
"DESC_VisitWebSite": "Visit our website:"
"DESC_SectionMainApplication": "A főprogram.",
"DESC_SectionLauncher": "Az indító, amelyet webböngészővel történő üzenetküldésre használsz.",
"DESC_SectionStartMenuShortcut": "Ikon létrehozása a Start menüben",
"DESC_SectionDesktopShortcut": "Ikon létrehozása az asztalon",
"DESC_UninstallIconDescription": "A DownZemAll eltávolítása",
"DESC_ApplicationSession": "Alkalmazás (szükséges)",
"DESC_LauncherSession": "Indító (szükséges)",
"DESC_StartMenuGroupSession": "Start menü ikon",
"DESC_DesktopShortcutSession": "Asztali ikon",
"DESC_VisitWebSite": "Látogasd meg a weboldalt:"
}
File renamed without changes.
12 changes: 12 additions & 0 deletions installer/windows/NSIS/i18n/sources/pl.json
@@ -0,0 +1,12 @@
{
"DESC_SectionMainApplication": "The main application.",
"DESC_SectionLauncher": "The launcher, used for messaging with web browser.",
"DESC_SectionStartMenuShortcut": "Create Start Menu Shortcut.",
"DESC_SectionDesktopShortcut": "Create Desktop Shortcut.",
"DESC_UninstallIconDescription": "Uninstall DownZemAll",
"DESC_ApplicationSession": "Application (required)",
"DESC_LauncherSession": "Launcher (required)",
"DESC_StartMenuGroupSession": "Start Menu Shortcut",
"DESC_DesktopShortcutSession": "Desktop Shortcut",
"DESC_VisitWebSite": "Visit our website:"
}
12 changes: 12 additions & 0 deletions installer/windows/NSIS/i18n/sources/vi.json
@@ -0,0 +1,12 @@
{
"DESC_SectionMainApplication": "The main application.",
"DESC_SectionLauncher": "The launcher, used for messaging with web browser.",
"DESC_SectionStartMenuShortcut": "Create Start Menu Shortcut.",
"DESC_SectionDesktopShortcut": "Create Desktop Shortcut.",
"DESC_UninstallIconDescription": "Uninstall DownZemAll",
"DESC_ApplicationSession": "Application (required)",
"DESC_LauncherSession": "Launcher (required)",
"DESC_StartMenuGroupSession": "Start Menu Shortcut",
"DESC_DesktopShortcutSession": "Desktop Shortcut",
"DESC_VisitWebSite": "Visit our website:"
}
7 changes: 6 additions & 1 deletion installer/windows/NSIS/setup.nsi
Expand Up @@ -152,15 +152,20 @@ Unicode true

!insertmacro LOAD_LANGUAGE "English"
!insertmacro LOAD_LANGUAGE "Arabic"
!insertmacro LOAD_LANGUAGE "Dutch"
!insertmacro LOAD_LANGUAGE "SimpChinese"
!insertmacro LOAD_LANGUAGE "French"
!insertmacro LOAD_LANGUAGE "German"
!insertmacro LOAD_LANGUAGE "Korean"
!insertmacro LOAD_LANGUAGE "Hungarian"
!insertmacro LOAD_LANGUAGE "Italian"
!insertmacro LOAD_LANGUAGE "Japanese"
!insertmacro LOAD_LANGUAGE "Korean"
!insertmacro LOAD_LANGUAGE "Polish"
!insertmacro LOAD_LANGUAGE "Portuguese"
!insertmacro LOAD_LANGUAGE "PortugueseBR"
!insertmacro LOAD_LANGUAGE "Russian"
!insertmacro LOAD_LANGUAGE "Spanish"
!insertmacro LOAD_LANGUAGE "Vietnamese"

;--------------------------------
;Installer Sections
Expand Down
2 changes: 2 additions & 0 deletions src/CMakeLists.txt
Expand Up @@ -81,12 +81,14 @@ qt_add_translations(${TARGET_NAME}
${CMAKE_SOURCE_DIR}/src/locale/dza_fr_FR.ts # French
${CMAKE_SOURCE_DIR}/src/locale/dza_hu_HU.ts # Hungarian
${CMAKE_SOURCE_DIR}/src/locale/dza_it_IT.ts # Italian
${CMAKE_SOURCE_DIR}/src/locale/dza_ja_JP.ts # Japanese
${CMAKE_SOURCE_DIR}/src/locale/dza_ko_KR.ts # Korean
${CMAKE_SOURCE_DIR}/src/locale/dza_nl_NL.ts # Dutch
${CMAKE_SOURCE_DIR}/src/locale/dza_pl_PL.ts # Polish
${CMAKE_SOURCE_DIR}/src/locale/dza_pt_BR.ts # Portuguese (Brazil)
${CMAKE_SOURCE_DIR}/src/locale/dza_pt_PT.ts # Portuguese (Portugal)
${CMAKE_SOURCE_DIR}/src/locale/dza_ru_RU.ts # Russian
${CMAKE_SOURCE_DIR}/src/locale/dza_vi_VN.ts # Vietnamese
${CMAKE_SOURCE_DIR}/src/locale/dza_zh_CN.ts # Chinese (Simplified & Traditional)
QM_FILES_OUTPUT_VARIABLE
qm_files
Expand Down
Binary file removed src/locale/dza_ar_EG.qm
Binary file not shown.
Binary file removed src/locale/dza_de_DE.qm
Binary file not shown.
Binary file removed src/locale/dza_en_US.qm
Binary file not shown.
Binary file removed src/locale/dza_es_ES.qm
Binary file not shown.
Binary file removed src/locale/dza_fr_FR.qm
Binary file not shown.
Binary file removed src/locale/dza_hu_HU.qm
Binary file not shown.

0 comments on commit 47857c5

Please sign in to comment.