Skip to content

Commit be25896

Browse files
authored
Merge pull request #3507 from OpenShot/language-file-names
translations: Use OpenShot_locale.qm file names
2 parents d783de3 + e51cbf7 commit be25896

File tree

104 files changed

+245037
-244822
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+245037
-244822
lines changed

src/classes/info.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,14 @@
105105
try:
106106
from PyQt5.QtCore import QDir
107107
langdir = QDir(language_path)
108-
langs = langdir.entryList(
109-
['OpenShot.*.qm'],
108+
trpaths = langdir.entryList(
109+
['OpenShot_*.qm'],
110110
QDir.NoDotAndDotDot | QDir.Files,
111111
sort=QDir.Name)
112-
for trpath in langs:
113-
SUPPORTED_LANGUAGES.append(trpath.split('.')[1])
112+
for trpath in trpaths:
113+
# Extract everything between "Openshot_" and ".qm"
114+
lang=trpath[trpath.find('_')+1:-3]
115+
SUPPORTED_LANGUAGES.append(lang)
114116
except ImportError:
115117
# Fail gracefully if we're running without PyQt5 (e.g. CI tasks)
116118
pass

src/classes/language.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def init_language():
6565
"prefix": 'qtbase_',
6666
"path": os.path.join(info.PATH, 'language')}, # Optional path where we package QT translations
6767
{"type": 'OpenShot',
68-
"prefix": 'OpenShot.', # Our custom translations
68+
"prefix": 'OpenShot_', # Our custom translations
6969
"path": language_path},
7070
)
7171

0 commit comments

Comments
 (0)