From 94bd4308c7eaabeaa9186e301a2c2c528c0565c5 Mon Sep 17 00:00:00 2001 From: sledgehammer999 Date: Fri, 18 Mar 2016 03:20:20 +0200 Subject: [PATCH] Fix selection of Portuguese translation files. Qt returns "Brazil" as country of QLocale("pt") instead of "Portugal". This conflicts with QLocale("pt_BR"). Rename the pt.ts to pt_PT and put a language mapping in tx's config for that locale. Closes #4776. --- .tx/config | 1 + src/lang.qrc | 2 +- src/lang/{qbittorrent_pt.ts => qbittorrent_pt_PT.ts} | 0 src/src.pro | 2 +- 4 files changed, 3 insertions(+), 2 deletions(-) rename src/lang/{qbittorrent_pt.ts => qbittorrent_pt_PT.ts} (100%) diff --git a/.tx/config b/.tx/config index 6a8cfc8d6..7b714cacb 100644 --- a/.tx/config +++ b/.tx/config @@ -3,6 +3,7 @@ host = https://www.transifex.com [qbittorrent.qbittorrent_v3_3_x] file_filter = src/lang/qbittorrent_.ts +lang_map = pt: pt_PT source_file = src/lang/qbittorrent_en.ts source_lang = en type = QT diff --git a/src/lang.qrc b/src/lang.qrc index 8c049520d..e060ab126 100644 --- a/src/lang.qrc +++ b/src/lang.qrc @@ -31,7 +31,7 @@ lang/qbittorrent_nb.qm lang/qbittorrent_nl.qm lang/qbittorrent_pl.qm - lang/qbittorrent_pt.qm + lang/qbittorrent_pt_PT.qm lang/qbittorrent_pt_BR.qm lang/qbittorrent_ro.qm lang/qbittorrent_ru.qm diff --git a/src/lang/qbittorrent_pt.ts b/src/lang/qbittorrent_pt_PT.ts similarity index 100% rename from src/lang/qbittorrent_pt.ts rename to src/lang/qbittorrent_pt_PT.ts diff --git a/src/src.pro b/src/src.pro index 346757a01..40ac30e2d 100644 --- a/src/src.pro +++ b/src/src.pro @@ -98,7 +98,7 @@ TRANSLATIONS = \ $$LANG_PATH/qbittorrent_sk.ts \ $$LANG_PATH/qbittorrent_sl.ts \ $$LANG_PATH/qbittorrent_ro.ts \ - $$LANG_PATH/qbittorrent_pt.ts \ + $$LANG_PATH/qbittorrent_pt_PT.ts \ $$LANG_PATH/qbittorrent_nb.ts \ $$LANG_PATH/qbittorrent_fi.ts \ $$LANG_PATH/qbittorrent_da.ts \