Skip to content

Commit

Permalink
Fix for localizations, adding Latvian translatiosn (#752)
Browse files Browse the repository at this point in the history
  • Loading branch information
raivisdejus committed May 24, 2024
1 parent a5fa313 commit c921b47
Show file tree
Hide file tree
Showing 15 changed files with 2,070 additions and 1,833 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,12 @@ translation_po_all:
$(MAKE) translation_po locale=zh_CN
$(MAKE) translation_po locale=zh_TW
$(MAKE) translation_po locale=it_IT
$(MAKE) translation_po locale=lv_LV

TMP_POT_FILE_PATH := $(shell mktemp)
PO_FILE_PATH := buzz/locale/${locale}/LC_MESSAGES/buzz.po
translation_po:
xgettext --from-code=UTF-8 -o "${TMP_POT_FILE_PATH}" -l python $(shell find buzz/widgets -name '*.py')
xgettext --from-code=UTF-8 -o "${TMP_POT_FILE_PATH}" -l python $(shell find buzz -name '*.py')
sed -i.bak 's/CHARSET/UTF-8/' ${TMP_POT_FILE_PATH} && rm ${TMP_POT_FILE_PATH}.bak
msgmerge -U ${PO_FILE_PATH} ${TMP_POT_FILE_PATH}

Expand Down
2 changes: 1 addition & 1 deletion buzz/locale.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
gettext.bindtextdomain("buzz", locale_dir)

translate = gettext.translation(
APP_NAME, locale_dir, languages=QLocale().uiLanguages(), fallback=True
APP_NAME.lower(), locale_dir, languages=QLocale().uiLanguages(), fallback=True
)

_ = translate.gettext
Loading

0 comments on commit c921b47

Please sign in to comment.