First Commit
This commit is contained in:
23158
pcsx2-qt/Translations/pcsx2-qt_af-ZA.ts
Normal file
23158
pcsx2-qt/Translations/pcsx2-qt_af-ZA.ts
Normal file
File diff suppressed because it is too large
Load Diff
23201
pcsx2-qt/Translations/pcsx2-qt_ar-SA.ts
Normal file
23201
pcsx2-qt/Translations/pcsx2-qt_ar-SA.ts
Normal file
File diff suppressed because it is too large
Load Diff
23155
pcsx2-qt/Translations/pcsx2-qt_bg-BG.ts
Normal file
23155
pcsx2-qt/Translations/pcsx2-qt_bg-BG.ts
Normal file
File diff suppressed because it is too large
Load Diff
23153
pcsx2-qt/Translations/pcsx2-qt_ca-ES.ts
Normal file
23153
pcsx2-qt/Translations/pcsx2-qt_ca-ES.ts
Normal file
File diff suppressed because it is too large
Load Diff
23176
pcsx2-qt/Translations/pcsx2-qt_cs-CZ.ts
Normal file
23176
pcsx2-qt/Translations/pcsx2-qt_cs-CZ.ts
Normal file
File diff suppressed because it is too large
Load Diff
23158
pcsx2-qt/Translations/pcsx2-qt_da-DK.ts
Normal file
23158
pcsx2-qt/Translations/pcsx2-qt_da-DK.ts
Normal file
File diff suppressed because it is too large
Load Diff
23155
pcsx2-qt/Translations/pcsx2-qt_de-DE.ts
Normal file
23155
pcsx2-qt/Translations/pcsx2-qt_de-DE.ts
Normal file
File diff suppressed because it is too large
Load Diff
23153
pcsx2-qt/Translations/pcsx2-qt_el-GR.ts
Normal file
23153
pcsx2-qt/Translations/pcsx2-qt_el-GR.ts
Normal file
File diff suppressed because it is too large
Load Diff
117
pcsx2-qt/Translations/pcsx2-qt_en-US.ts
Normal file
117
pcsx2-qt/Translations/pcsx2-qt_en-US.ts
Normal file
@@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="en_US" sourcelanguage="en_US">
|
||||
<context>
|
||||
<name>AchievementSettingsWidget</name>
|
||||
<message numerus="yes">
|
||||
<location filename="../Settings/AchievementSettingsWidget.cpp" line="134"/>
|
||||
<location filename="../Settings/AchievementSettingsWidget.cpp" line="141"/>
|
||||
<source>%n seconds</source>
|
||||
<translation>
|
||||
<numerusform>%n second</numerusform>
|
||||
<numerusform>%n seconds</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Achievements</name>
|
||||
<message numerus="yes">
|
||||
<location filename="../../pcsx2/Achievements.cpp" line="1023"/>
|
||||
<source>You have unlocked {} of %n achievements</source>
|
||||
<comment>Achievement popup</comment>
|
||||
<translation>
|
||||
<numerusform>You have unlocked {} of %n achievements</numerusform>
|
||||
<numerusform>You have unlocked {} of %n achievements</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<location filename="../../pcsx2/Achievements.cpp" line="1026"/>
|
||||
<source>and earned {} of %n points</source>
|
||||
<comment>Achievement popup</comment>
|
||||
<translation>
|
||||
<numerusform>and earned {} of %n points</numerusform>
|
||||
<numerusform>and earned {} of %n points</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<location filename="../../pcsx2/Achievements.cpp" line="1111"/>
|
||||
<source>%n achievements</source>
|
||||
<comment>Mastery popup</comment>
|
||||
<translation>
|
||||
<numerusform>%n achievement</numerusform>
|
||||
<numerusform>%n achievements</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<location filename="../../pcsx2/Achievements.cpp" line="1113"/>
|
||||
<source>%n points</source>
|
||||
<comment>Mastery popup</comment>
|
||||
<translation>
|
||||
<numerusform>%n point</numerusform>
|
||||
<numerusform>%n points</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>GameList</name>
|
||||
<message numerus="yes">
|
||||
<location filename="../GameList/GameListModel.cpp" line="268"/>
|
||||
<location filename="../../pcsx2/GameList.cpp" line="1142"/>
|
||||
<source>%n hours</source>
|
||||
<translation>
|
||||
<numerusform>%n hour</numerusform>
|
||||
<numerusform>%n hours</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<location filename="../GameList/GameListModel.cpp" line="270"/>
|
||||
<location filename="../../pcsx2/GameList.cpp" line="1144"/>
|
||||
<source>%n minutes</source>
|
||||
<translation>
|
||||
<numerusform>%n minute</numerusform>
|
||||
<numerusform>%n minutes</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>InputBindingWidget</name>
|
||||
<message numerus="yes">
|
||||
<location filename="../Settings/InputBindingWidget.cpp" line="73"/>
|
||||
<source>%n bindings</source>
|
||||
<translation>
|
||||
<numerusform>%n binding</numerusform>
|
||||
<numerusform>%n bindings</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Patch</name>
|
||||
<message numerus="yes">
|
||||
<location filename="../../pcsx2/Patch.cpp" line="698"/>
|
||||
<source>%n GameDB patches are active.</source>
|
||||
<comment>OSD Message</comment>
|
||||
<translation>
|
||||
<numerusform>%n GameDB patch is active.</numerusform>
|
||||
<numerusform>%n GameDB patches are active.</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<location filename="../../pcsx2/Patch.cpp" line="705"/>
|
||||
<source>%n game patches are active.</source>
|
||||
<comment>OSD Message</comment>
|
||||
<translation>
|
||||
<numerusform>%n game patch is active.</numerusform>
|
||||
<numerusform>%n game patches are active.</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<location filename="../../pcsx2/Patch.cpp" line="712"/>
|
||||
<source>%n cheat patches are active.</source>
|
||||
<comment>OSD Message</comment>
|
||||
<translation>
|
||||
<numerusform>%n cheat patch is active.</numerusform>
|
||||
<numerusform>%n cheat patches are active.</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
23026
pcsx2-qt/Translations/pcsx2-qt_en.ts
Normal file
23026
pcsx2-qt/Translations/pcsx2-qt_en.ts
Normal file
File diff suppressed because it is too large
Load Diff
23157
pcsx2-qt/Translations/pcsx2-qt_es-419.ts
Normal file
23157
pcsx2-qt/Translations/pcsx2-qt_es-419.ts
Normal file
File diff suppressed because it is too large
Load Diff
23161
pcsx2-qt/Translations/pcsx2-qt_es-ES.ts
Normal file
23161
pcsx2-qt/Translations/pcsx2-qt_es-ES.ts
Normal file
File diff suppressed because it is too large
Load Diff
23152
pcsx2-qt/Translations/pcsx2-qt_fa-IR.ts
Normal file
23152
pcsx2-qt/Translations/pcsx2-qt_fa-IR.ts
Normal file
File diff suppressed because it is too large
Load Diff
23159
pcsx2-qt/Translations/pcsx2-qt_fi-FI.ts
Normal file
23159
pcsx2-qt/Translations/pcsx2-qt_fi-FI.ts
Normal file
File diff suppressed because it is too large
Load Diff
23155
pcsx2-qt/Translations/pcsx2-qt_fr-FR.ts
Normal file
23155
pcsx2-qt/Translations/pcsx2-qt_fr-FR.ts
Normal file
File diff suppressed because it is too large
Load Diff
23155
pcsx2-qt/Translations/pcsx2-qt_gn-PY.ts
Normal file
23155
pcsx2-qt/Translations/pcsx2-qt_gn-PY.ts
Normal file
File diff suppressed because it is too large
Load Diff
23178
pcsx2-qt/Translations/pcsx2-qt_he-IL.ts
Normal file
23178
pcsx2-qt/Translations/pcsx2-qt_he-IL.ts
Normal file
File diff suppressed because it is too large
Load Diff
23160
pcsx2-qt/Translations/pcsx2-qt_hi-IN.ts
Normal file
23160
pcsx2-qt/Translations/pcsx2-qt_hi-IN.ts
Normal file
File diff suppressed because it is too large
Load Diff
23171
pcsx2-qt/Translations/pcsx2-qt_hr-HR.ts
Normal file
23171
pcsx2-qt/Translations/pcsx2-qt_hr-HR.ts
Normal file
File diff suppressed because it is too large
Load Diff
23153
pcsx2-qt/Translations/pcsx2-qt_hu-HU.ts
Normal file
23153
pcsx2-qt/Translations/pcsx2-qt_hu-HU.ts
Normal file
File diff suppressed because it is too large
Load Diff
23157
pcsx2-qt/Translations/pcsx2-qt_id-ID.ts
Normal file
23157
pcsx2-qt/Translations/pcsx2-qt_id-ID.ts
Normal file
File diff suppressed because it is too large
Load Diff
23181
pcsx2-qt/Translations/pcsx2-qt_it-IT.ts
Normal file
23181
pcsx2-qt/Translations/pcsx2-qt_it-IT.ts
Normal file
File diff suppressed because it is too large
Load Diff
23144
pcsx2-qt/Translations/pcsx2-qt_ja-JP.ts
Normal file
23144
pcsx2-qt/Translations/pcsx2-qt_ja-JP.ts
Normal file
File diff suppressed because it is too large
Load Diff
23156
pcsx2-qt/Translations/pcsx2-qt_ka-GE.ts
Normal file
23156
pcsx2-qt/Translations/pcsx2-qt_ka-GE.ts
Normal file
File diff suppressed because it is too large
Load Diff
23139
pcsx2-qt/Translations/pcsx2-qt_ko-KR.ts
Normal file
23139
pcsx2-qt/Translations/pcsx2-qt_ko-KR.ts
Normal file
File diff suppressed because it is too large
Load Diff
23176
pcsx2-qt/Translations/pcsx2-qt_lt-LT.ts
Normal file
23176
pcsx2-qt/Translations/pcsx2-qt_lt-LT.ts
Normal file
File diff suppressed because it is too large
Load Diff
23172
pcsx2-qt/Translations/pcsx2-qt_lv-LV.ts
Normal file
23172
pcsx2-qt/Translations/pcsx2-qt_lv-LV.ts
Normal file
File diff suppressed because it is too large
Load Diff
23159
pcsx2-qt/Translations/pcsx2-qt_nl-NL.ts
Normal file
23159
pcsx2-qt/Translations/pcsx2-qt_nl-NL.ts
Normal file
File diff suppressed because it is too large
Load Diff
23157
pcsx2-qt/Translations/pcsx2-qt_no-NO.ts
Normal file
23157
pcsx2-qt/Translations/pcsx2-qt_no-NO.ts
Normal file
File diff suppressed because it is too large
Load Diff
23178
pcsx2-qt/Translations/pcsx2-qt_pl-PL.ts
Normal file
23178
pcsx2-qt/Translations/pcsx2-qt_pl-PL.ts
Normal file
File diff suppressed because it is too large
Load Diff
23158
pcsx2-qt/Translations/pcsx2-qt_pt-BR.ts
Normal file
23158
pcsx2-qt/Translations/pcsx2-qt_pt-BR.ts
Normal file
File diff suppressed because it is too large
Load Diff
23156
pcsx2-qt/Translations/pcsx2-qt_pt-PT.ts
Normal file
23156
pcsx2-qt/Translations/pcsx2-qt_pt-PT.ts
Normal file
File diff suppressed because it is too large
Load Diff
23158
pcsx2-qt/Translations/pcsx2-qt_qu-PE.ts
Normal file
23158
pcsx2-qt/Translations/pcsx2-qt_qu-PE.ts
Normal file
File diff suppressed because it is too large
Load Diff
23167
pcsx2-qt/Translations/pcsx2-qt_ro-RO.ts
Normal file
23167
pcsx2-qt/Translations/pcsx2-qt_ro-RO.ts
Normal file
File diff suppressed because it is too large
Load Diff
23177
pcsx2-qt/Translations/pcsx2-qt_ru-RU.ts
Normal file
23177
pcsx2-qt/Translations/pcsx2-qt_ru-RU.ts
Normal file
File diff suppressed because it is too large
Load Diff
23169
pcsx2-qt/Translations/pcsx2-qt_sr-SP.ts
Normal file
23169
pcsx2-qt/Translations/pcsx2-qt_sr-SP.ts
Normal file
File diff suppressed because it is too large
Load Diff
23159
pcsx2-qt/Translations/pcsx2-qt_sv-SE.ts
Normal file
23159
pcsx2-qt/Translations/pcsx2-qt_sv-SE.ts
Normal file
File diff suppressed because it is too large
Load Diff
23157
pcsx2-qt/Translations/pcsx2-qt_tr-TR.ts
Normal file
23157
pcsx2-qt/Translations/pcsx2-qt_tr-TR.ts
Normal file
File diff suppressed because it is too large
Load Diff
23178
pcsx2-qt/Translations/pcsx2-qt_uk-UA.ts
Normal file
23178
pcsx2-qt/Translations/pcsx2-qt_uk-UA.ts
Normal file
File diff suppressed because it is too large
Load Diff
23150
pcsx2-qt/Translations/pcsx2-qt_vi-VN.ts
Normal file
23150
pcsx2-qt/Translations/pcsx2-qt_vi-VN.ts
Normal file
File diff suppressed because it is too large
Load Diff
23146
pcsx2-qt/Translations/pcsx2-qt_zh-CN.ts
Normal file
23146
pcsx2-qt/Translations/pcsx2-qt_zh-CN.ts
Normal file
File diff suppressed because it is too large
Load Diff
23147
pcsx2-qt/Translations/pcsx2-qt_zh-TW.ts
Normal file
23147
pcsx2-qt/Translations/pcsx2-qt_zh-TW.ts
Normal file
File diff suppressed because it is too large
Load Diff
10
pcsx2-qt/Translations/update_base_translation.bat
Normal file
10
pcsx2-qt/Translations/update_base_translation.bat
Normal file
@@ -0,0 +1,10 @@
|
||||
@echo off
|
||||
|
||||
set QTBIN=..\..\deps\bin
|
||||
set SRCDIRS=../ ../../pcsx2/
|
||||
|
||||
set OPTS=-tr-function-alias QT_TRANSLATE_NOOP+=TRANSLATE,QT_TRANSLATE_NOOP+=TRANSLATE_SV,QT_TRANSLATE_NOOP+=TRANSLATE_STR,QT_TRANSLATE_NOOP+=TRANSLATE_FS,QT_TRANSLATE_N_NOOP3+=TRANSLATE_FMT,QT_TRANSLATE_NOOP+=TRANSLATE_NOOP,translate+=TRANSLATE_PLURAL_STR,translate+=TRANSLATE_PLURAL_FS
|
||||
|
||||
"%QTBIN%\lupdate.exe" %SRCDIRS% %OPTS% -no-obsolete -source-language en -ts pcsx2-qt_en.ts
|
||||
|
||||
pause
|
||||
9
pcsx2-qt/Translations/update_base_translation.sh
Executable file
9
pcsx2-qt/Translations/update_base_translation.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
SCRIPTDIR=$(dirname "${BASH_SOURCE[0]}")
|
||||
|
||||
OPTS="-tr-function-alias QT_TRANSLATE_NOOP+=TRANSLATE,QT_TRANSLATE_NOOP+=TRANSLATE_SV,QT_TRANSLATE_NOOP+=TRANSLATE_STR,QT_TRANSLATE_NOOP+=TRANSLATE_FS,QT_TRANSLATE_N_NOOP3+=TRANSLATE_FMT,QT_TRANSLATE_NOOP+=TRANSLATE_NOOP,translate+=TRANSLATE_PLURAL_STR,translate+=TRANSLATE_PLURAL_FS"
|
||||
SRCDIRS=$(realpath "$SCRIPTDIR/..")/\ $(realpath "$SCRIPTDIR/../../pcsx2")/
|
||||
OUTDIR=$(realpath "$SCRIPTDIR")
|
||||
|
||||
lupdate $SRCDIRS $OPTS -no-obsolete -source-language en -ts "$OUTDIR/pcsx2-qt_en.ts"
|
||||
9
pcsx2-qt/Translations/update_en_translation.bat
Normal file
9
pcsx2-qt/Translations/update_en_translation.bat
Normal file
@@ -0,0 +1,9 @@
|
||||
@echo off
|
||||
|
||||
set QTBIN=..\..\deps\bin
|
||||
set SRCDIRS=../ ../../pcsx2/
|
||||
|
||||
set OPTS=-tr-function-alias QT_TRANSLATE_NOOP+=TRANSLATE,QT_TRANSLATE_NOOP+=TRANSLATE_SV,QT_TRANSLATE_NOOP+=TRANSLATE_STR,QT_TRANSLATE_NOOP+=TRANSLATE_FS,QT_TRANSLATE_N_NOOP3+=TRANSLATE_FMT,QT_TRANSLATE_NOOP+=TRANSLATE_NOOP,translate+=TRANSLATE_PLURAL_STR,translate+=TRANSLATE_PLURAL_FS -pluralonly -no-obsolete
|
||||
|
||||
"%QTBIN%\lupdate.exe" %SRCDIRS% %OPTS% -no-obsolete -source-language en_US -ts pcsx2-qt_en-US.ts
|
||||
start %QTBIN%\linguist.exe %~dp0\pcsx2-qt_en-US.ts
|
||||
9
pcsx2-qt/Translations/update_en_translation.sh
Executable file
9
pcsx2-qt/Translations/update_en_translation.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
SCRIPTDIR=$(dirname "${BASH_SOURCE[0]}")
|
||||
|
||||
OPTS="-tr-function-alias QT_TRANSLATE_NOOP+=TRANSLATE,QT_TRANSLATE_NOOP+=TRANSLATE_SV,QT_TRANSLATE_NOOP+=TRANSLATE_STR,QT_TRANSLATE_NOOP+=TRANSLATE_FS,QT_TRANSLATE_N_NOOP3+=TRANSLATE_FMT,QT_TRANSLATE_NOOP+=TRANSLATE_NOOP,translate+=TRANSLATE_PLURAL_STR,translate+=TRANSLATE_PLURAL_FS -pluralonly -no-obsolete"
|
||||
SRCDIRS=$(realpath "$SCRIPTDIR/..")/\ $(realpath "$SCRIPTDIR/../../pcsx2")/
|
||||
OUTDIR=$(realpath "$SCRIPTDIR")
|
||||
|
||||
lupdate $SRCDIRS $OPTS -no-obsolete -source-language en_US -ts "$OUTDIR/pcsx2-qt_en-US.ts"
|
||||
69
pcsx2-qt/Translations/update_glyph_ranges.py
Executable file
69
pcsx2-qt/Translations/update_glyph_ranges.py
Executable file
@@ -0,0 +1,69 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
import re
|
||||
import xml.etree.ElementTree as ET
|
||||
|
||||
languages_to_update = [
|
||||
"ja-JP",
|
||||
"ko-KR",
|
||||
"zh-CN",
|
||||
"zh-TW"
|
||||
]
|
||||
|
||||
src_path = os.path.join(os.path.dirname(__file__), "..", "Translations.cpp")
|
||||
ts_dir = os.path.join(os.path.dirname(__file__))
|
||||
|
||||
def parse_xml(path):
|
||||
tree = ET.parse(path)
|
||||
root = tree.getroot()
|
||||
translations = ""
|
||||
for node in root.findall("context/message/translation"):
|
||||
if node.text:
|
||||
translations += node.text
|
||||
|
||||
ords = list(set([ord(ch) for ch in translations if ord(ch) >= 0x2000]))
|
||||
if len(ords) == 0:
|
||||
return ""
|
||||
|
||||
# Try to organize it into ranges
|
||||
ords.sort()
|
||||
ord_pairs = []
|
||||
start_ord = None
|
||||
last_ord = None
|
||||
for nord in ords:
|
||||
if start_ord is not None and nord == (last_ord + 1):
|
||||
last_ord = nord
|
||||
continue
|
||||
if start_ord is not None:
|
||||
ord_pairs.append(start_ord)
|
||||
ord_pairs.append(last_ord)
|
||||
start_ord = nord
|
||||
last_ord = nord
|
||||
|
||||
if start_ord is not None:
|
||||
ord_pairs.append(start_ord)
|
||||
ord_pairs.append(last_ord)
|
||||
|
||||
chars = "".join([chr(ch) for ch in ord_pairs])
|
||||
return chars
|
||||
|
||||
def update_src_file(ts_file, chars):
|
||||
ts_name = os.path.basename(ts_file)
|
||||
pattern = re.compile('(// auto update.*' + ts_name + '.*\n[^"]+")[^"]*(".*)')
|
||||
with open(src_path, "r", encoding="utf-8") as f:
|
||||
original = f.read()
|
||||
update = pattern.sub("\\1" + chars + "\\2", original)
|
||||
if original != update:
|
||||
with open(src_path, "w", encoding="utf-8") as f:
|
||||
f.write(update)
|
||||
print(f"Updated character list for {ts_file}.")
|
||||
else:
|
||||
print(f"Character list is unchanged for {ts_file}.")
|
||||
|
||||
if __name__ == "__main__":
|
||||
for language in languages_to_update:
|
||||
ts_file = os.path.join(ts_dir, f"pcsx2-qt_{language}.ts")
|
||||
chars = parse_xml(ts_file)
|
||||
print(f"{language}: {len(chars)} character(s) detected.")
|
||||
update_src_file(ts_file, chars)
|
||||
Reference in New Issue
Block a user