From e97ab6105db4b3fa03d0cbe5182fb2f7a3ef3e0e Mon Sep 17 00:00:00 2001 From: RaydenX93 Date: Sun, 11 Oct 2020 11:24:51 +0200 Subject: [PATCH] Update update-and-edit-language_dragndrop.bat --- .../update-and-edit-language_dragndrop.bat | 48 +++++++++++++++++-- 1 file changed, 43 insertions(+), 5 deletions(-) diff --git a/src/duckstation-qt/translations/update-and-edit-language_dragndrop.bat b/src/duckstation-qt/translations/update-and-edit-language_dragndrop.bat index 2cabdcf0f..e58332561 100644 --- a/src/duckstation-qt/translations/update-and-edit-language_dragndrop.bat +++ b/src/duckstation-qt/translations/update-and-edit-language_dragndrop.bat @@ -1,11 +1,13 @@ @ECHO OFF REM Script to provide and easy way to update and edit .ts files for Duckstation. REM Usage: drag and drop a duckstation .ts file on this batch file -TITLE Duckstation - Update and Edit .ts files (Drag n Drop) +REM Author: RaydenX93 +REM Credits to Stenzek, Sam Pearman +TITLE Duckstation - Create, and Edit .ts files (Drag n Drop) REM Check if an argument is provided SET arg1="%~1" -IF %arg1%=="" goto noarg +IF %arg1%=="" GOTO noarg REM get filename.extension and extension separately FOR %%A IN (%arg1%) DO ( @@ -18,10 +20,46 @@ IF %ext%==.ts GOTO goodfile REM The wrong or no file has been passed :noarg -ECHO Please, drag and drop a .ts file on this batch file to update it and edit it. +ECHO =================================================================== +ECHO Duckstation - Create, Update and Edit .ts files (Drag n Drop) +ECHO =================================================================== +ECHO If you want to update and edit an EXISTING translation, drag and drop a .ts file on this batch file. ECHO. -PAUSE -EXIT +ECHO If you want to create a NEW translation, input (y) to start the process. +ECHO. +SET /P answ=Do you want to create a new translation? (y/n)... + +IF %answ%==y (GOTO newlang) ELSE EXIT + +:newlang +CLS + +ECHO Please, insert your language code. +ECHO. +ECHO For the 369-1 2-digit language code: +ECHO https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes +ECHO. +ECHO If you require a country code as well (you probably don't): +ECHO https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes +ECHO. +ECHO You can select with your mouse and then CTRL^+C to copy the links above. +ECHO. +ECHO Examples: +ECHO en ^<-- English +ECHO en-au ^<-- Australian English +ECHO. + +SET /P langcode=Insert your language code... + +CLS +IF NOT DEFINED langcode ( + ECHO Input is invalid. Try again. + ECHO. + PAUSE + GOTO newlang +) ELSE ( + SET filename=duckstation-qt_%langcode%.ts +) REM A good .ts file has been passed :goodfile