From 6bd822352ebeac5d16d237836497ac0571deb431 Mon Sep 17 00:00:00 2001 From: Lawrence Lee <45837045+Lawrence37@users.noreply.github.com> Date: Tue, 4 Jul 2023 17:40:33 -0700 Subject: [PATCH] Display actual language names in preferences Add ability to set metadata variables in the language files. Use the LANGUAGE_DISPLAY_NAME metadata variable value in preferences to show the languages. Metadata variables are defined in the first section of a language file, i.e. the comments at the beginning of the file. At most one variable can be defined per line. The definition takes the following format: #
@= where:
is any sequence of non-whitespace characters is any non-empty sequence of whitespace characters is the metadata key name is the metadata value For example, #101 @LANGUAGE_DISPLAY_NAME=English (US) defines a metadata key "LANGUAGE_DISPLAY_NAME" with value "English (US)". Lines that do not match the format are ignored. --- rtdata/languages/Catala | 4 +- rtdata/languages/Chinese (Simplified) | 20 +- rtdata/languages/Czech | 98 +++++----- rtdata/languages/Dansk | 4 +- rtdata/languages/Deutsch | 176 +++++++++--------- rtdata/languages/Espanol (Castellano) | 6 +- rtdata/languages/Espanol (Latin America) | 128 ++++++------- rtdata/languages/Francais | 4 +- rtdata/languages/Italiano | 12 +- rtdata/languages/Japanese | 4 +- rtdata/languages/Magyar | 4 +- rtdata/languages/Nederlands | 36 ++-- rtdata/languages/Polish | 28 +-- rtdata/languages/Portugues | 6 +- rtdata/languages/Portugues (Brasil) | 6 +- rtdata/languages/Russian | 20 +- rtdata/languages/Serbian (Cyrilic Characters) | 4 +- rtdata/languages/Slovenian | 4 +- rtdata/languages/Swedish | 10 +- rtgui/multilangmgr.cc | 94 ++++++++++ rtgui/multilangmgr.h | 21 +++ rtgui/preferences.cc | 39 ++-- 22 files changed, 446 insertions(+), 282 deletions(-) diff --git a/rtdata/languages/Catala b/rtdata/languages/Catala index 4485966ff..cde9262ea 100644 --- a/rtdata/languages/Catala +++ b/rtdata/languages/Catala @@ -1,4 +1,6 @@ -#01 2009-10-10 JMG +#001 2009-10-10 JMG +#100 +#101 @LANGUAGE_DISPLAY_NAME=Català ABOUT_TAB_BUILD;Versió ABOUT_TAB_CREDITS;Crèdits diff --git a/rtdata/languages/Chinese (Simplified) b/rtdata/languages/Chinese (Simplified) index e4e89fed2..06e9fadbe 100644 --- a/rtdata/languages/Chinese (Simplified) +++ b/rtdata/languages/Chinese (Simplified) @@ -1,12 +1,14 @@ -#00 Chinese (Simplified) -#01 2008-02-13 Forrest Sun -#02 2008-11-06 Yang Gao (grantyale) -#03 2013-10-20 Jiero -#04 2014-10-24 Jie Luo -#05 2017-09-18 Chongnuo Ji -#06 2020-08-11 十一元人民币 -#07 2021-09-24 十一元人民币 -#08 2022-07-26 十一元人民币 +#000 Chinese (Simplified) +#001 2008-02-13 Forrest Sun +#002 2008-11-06 Yang Gao (grantyale) +#003 2013-10-20 Jiero +#004 2014-10-24 Jie Luo +#005 2017-09-18 Chongnuo Ji +#006 2020-08-11 十一元人民币 +#007 2021-09-24 十一元人民币 +#008 2022-07-26 十一元人民币 +#100 +#101 @LANGUAGE_DISPLAY_NAME=简体中文 ABOUT_TAB_BUILD;版本 ABOUT_TAB_CREDITS;致谢名单 diff --git a/rtdata/languages/Czech b/rtdata/languages/Czech index 61e6af4bf..680e0a1bb 100644 --- a/rtdata/languages/Czech +++ b/rtdata/languages/Czech @@ -1,51 +1,53 @@ -#00 Czech -#01 2008-01-20 translated by absolution -#02 2008-02-21 updated by mkyral (typos and some missing strings) -#03 2008-04-24 updated by mkyral (for version 2.4m1) -#04 2008-10-28 updated by mkyral (for version 2.4 beta1) -#05 2010-11-25 updated by mkyral (for version 3.0) -#06 2011-03-06 updated by mkyral (default branch) -#07 2011-03-20 updated by mkyral (default branch) -#08 2011-05-01 updated by mkyral -#09 2011-05-18 updated by mkyral -#10 2011-06-04 updated by mkyral -#11 2011-06-12 updated by mkyral -#12 2011-06-16 updated by mkyral -#13 2011-07-03 updated by mkyral -#14 2011-07-08 updated by mkyral -#15 2011-09-04 updated by mkyral -#16 2011-09-06 updated by mkyral -#17 2011-11-12 updated by mkyral -#18 2011-12-29 updated by mkyral -#19 2012-02-22 updated by mkyral -#20 2012-04-28 updated by mkyral -#21 2012-10-10 updated by mkyral -#22 2012-11-27 updated by mkyral -#23 2013-03-12 updated by mkyral -#24 2013-04-12 updated by mkyral -#25 2013-09-12 updated by mkyral -#26 2013-09-17 updated by mkyral -#27 2013-12-09 updated by mkyral -#28 2014-01-07 updated by mkyral -#29 2014-04-08 updated by mkyral -#30 2014-04-30 updated by mkyral -#31 2014-05-12 updated by mkyral -#32 2014-10-24 updated by mkyral -#33 2015-02-22 updated by mkyral -#34 2015-07-09 updated by mkyral -#35 2015-11-24 updated by mkyral -#36 2016-10-18 updated by mkyral -#37 2017-01-10 updated by mkyral -#38 2017-04-26 updated by mkyral -#39 2017-07-21 updated by mkyral -#40 2017-12-13 updated by mkyral -#41 2018-03-03 updated by mkyral -#42 2018-10-24 updated by mkyral -#43 2018-12-04 updated by mkyral -#44 2018-12-13 updated by mkyral -#45 2020-04-20 updated by mkyral -#46 2020-04-21 updated by mkyral -#47 2020-06-02 updated by mkyral +#000 Czech +#001 2008-01-20 translated by absolution +#002 2008-02-21 updated by mkyral (typos and some missing strings) +#003 2008-04-24 updated by mkyral (for version 2.4m1) +#004 2008-10-28 updated by mkyral (for version 2.4 beta1) +#005 2010-11-25 updated by mkyral (for version 3.0) +#006 2011-03-06 updated by mkyral (default branch) +#007 2011-03-20 updated by mkyral (default branch) +#008 2011-05-01 updated by mkyral +#009 2011-05-18 updated by mkyral +#010 2011-06-04 updated by mkyral +#011 2011-06-12 updated by mkyral +#012 2011-06-16 updated by mkyral +#013 2011-07-03 updated by mkyral +#014 2011-07-08 updated by mkyral +#015 2011-09-04 updated by mkyral +#016 2011-09-06 updated by mkyral +#017 2011-11-12 updated by mkyral +#018 2011-12-29 updated by mkyral +#019 2012-02-22 updated by mkyral +#020 2012-04-28 updated by mkyral +#021 2012-10-10 updated by mkyral +#022 2012-11-27 updated by mkyral +#023 2013-03-12 updated by mkyral +#024 2013-04-12 updated by mkyral +#025 2013-09-12 updated by mkyral +#026 2013-09-17 updated by mkyral +#027 2013-12-09 updated by mkyral +#028 2014-01-07 updated by mkyral +#029 2014-04-08 updated by mkyral +#030 2014-04-30 updated by mkyral +#031 2014-05-12 updated by mkyral +#032 2014-10-24 updated by mkyral +#033 2015-02-22 updated by mkyral +#034 2015-07-09 updated by mkyral +#035 2015-11-24 updated by mkyral +#036 2016-10-18 updated by mkyral +#037 2017-01-10 updated by mkyral +#038 2017-04-26 updated by mkyral +#039 2017-07-21 updated by mkyral +#040 2017-12-13 updated by mkyral +#041 2018-03-03 updated by mkyral +#042 2018-10-24 updated by mkyral +#043 2018-12-04 updated by mkyral +#044 2018-12-13 updated by mkyral +#045 2020-04-20 updated by mkyral +#046 2020-04-21 updated by mkyral +#047 2020-06-02 updated by mkyral +#100 +#101 @LANGUAGE_DISPLAY_NAME=Český ABOUT_TAB_BUILD;Verze ABOUT_TAB_CREDITS;Zásluhy diff --git a/rtdata/languages/Dansk b/rtdata/languages/Dansk index 2cfbf4e27..d3a67766e 100644 --- a/rtdata/languages/Dansk +++ b/rtdata/languages/Dansk @@ -1,4 +1,6 @@ -#01 2022-04-21 mogensjaeger (github), initial danish translation +#001 2022-04-21 mogensjaeger (github), initial danish translation +#100 +#101 @LANGUAGE_DISPLAY_NAME=Dansk ABOUT_TAB_BUILD;Version ABOUT_TAB_CREDITS;Credits diff --git a/rtdata/languages/Deutsch b/rtdata/languages/Deutsch index 3a2c2999c..ceb738ece 100644 --- a/rtdata/languages/Deutsch +++ b/rtdata/languages/Deutsch @@ -1,90 +1,92 @@ -#01 keenonkites; Aktualisierte Version für 2.3 beta2 -#02 phberlin; basiert auf keenonkites' Erstübersetzung -#03 2007-12-20 -#04 2007-12-22 -#05 2008-01-08 -#06 2008-01-15 -#07 2008-02-20 -#08 2008-12-19 keenonkites, Anpassungen für 2.4beta4 -#09 2008-09-20 keenonkites, Anpassungen für 2.4m2 -#10 2008-04-04 Anpassungen für 2.4 -#11 Leichte Anpassungen (keenonkites/klonk) -#12 Erweiterung (oduis) -#13 Erweiterung (oduis) -#14 Erweiterung (oduis) -#15 Erweiterung (oduis) -#16 2012-12-05 3.0 alpha: Erweiterung und Korrekturen (Metex) -#17 2012-04-29 Erweiterungen und Korrekturen (MaWe) -#18 Erweiterung (oduis) -#19 Erweiterung (oduis) -#20 2013-02-27 Erweiterung (cytrinox) -#21 2013-12-31 Erweiterung (Ingo) -#22 2015-09-04 komplette Überarbeitung (TooWaBoo) -#23 2015-10-24 Retinexübersetzung und Korrekturen (TooWaBoo) -#24 2015-11-01 Korrekturen (TooWaBoo) RT4.2.450 -#25 2015-11-30 Korrekturen (TooWaBoo) RT4.2.507 -#26 2015-12-13 Korrekturen (TooWaBoo) RT4.2.514 -#26 2015-12-22 Korrekturen (TooWaBoo) RT4.2.536 -#27 2016-02-12 Retinexübersetzung (TooWaBoo) RT4.2.730 -#28 2016-03-19 Erweiterung/Korrekturen (TooWaBoo) RT4.2.880 -#29 2016-05-24 Erweiterung/Korrekturen (TooWaBoo) RT4.2.1005 -#30 2016-09-30 Erweiterung/Korrekturen (TooWaBoo) RT4.2.1234 -#31 2016-12-01 Erweiterung/Korrekturen (TooWaBoo) RT4.2.1408 -#32 2016-12-29 Erweiterung/Korrekturen (TooWaBoo) RT4.2.1464 -#33 2017-01-04 Erweiterung/Korrekturen/Soft-Proofing (TooWaBoo) RT4.2.1477 -#34 2017-01-07 IPTC (TooWaBoo) RT4.2.1492 -#35 2017-02-18 AWB bias (TooWaBoo) RT 5.0 r1 -#36 2017-02-23 Korrekturen (TooWaBoo) RT 5.0 r1 -#37 2017-03-06 Dynamisches Profil (TooWaBoo) RT 5.0 r1 -#38 2017-03-26 Pixel-Shift (TooWaBoo) RT 5.0 r1 -#39 06.04.2017 Fast Export (TooWaBoo) RT 5.0 r1 -#40 30.04.2017 Erweiterung/Korrekturen (TooWaBoo) RT 5.0 r1 -#41 03.05.2017 Erweiterung/Korrekturen (TooWaBoo) RT 5.0 r1 -#42 13.05.2017 Erweiterung (TooWaBoo) RT 5.0 r1 -#43 21.07.2017 Erweiterung (TooWaBoo) RT 5.1 -#44 21.09.2017 Erweiterung (TooWaBoo) RT 5.2 -#45 15.10.2017 Erweiterung (TooWaBoo) RT 5.3 -#46 18.10.2017 Erweiterung (TooWaBoo) RT 5.3 -#47 19.11.2017 HDR-Dynamikkompression (TooWaBoo) RT 5.3 -#48 13.12.2017 Erweiterung (TooWaBoo) RT 5.3 -#49 21.12.2017 Lokaler Kontrast (TooWaBoo) RT 5.3 -#50 07.01.2018 Crop Settings (TooWaBoo) RT 5.3 -#51 10.02.2018 Erweiterung (TooWaBoo) RT 5.3 -#52 10.02.2018 Korrektur (TooWaBoo) RT 5.3 -#53 26.02.2018 Erweiterung (TooWaBoo) RT 5.3 -#54 30.03.2018 Erweiterung (TooWaBoo) RT 5.4 -#55 06.04.2018 Erweiterung (TooWaBoo) RT 5.4 -#56 27.04.2018 Erweiterung (TooWaBoo) RT 5.4 -#57 17.05.2018 Erweiterung (TooWaBoo) RT 5.4 -#58 19.05.2018 Erweiterung (TooWaBoo) RT 5.4 -#59 29.05.2018 Erweiterung (TooWaBoo) RT 5.4 -#60 14.06.2018 Erweiterung (TooWaBoo) RT 5.4 -#61 14.06.2018 Korrektur (TooWaBoo) RT 5.4 -#62 22.06.2018 Korrektur (TooWaBoo) RT 5.4 -#63 24.06.2018 DCB/RCD+VNG4 (TooWaBoo) RT 5.4 -#64 24.06.2018 Erweiterung/Korrektur (TooWaBoo) RT 5.4 -#65 25.06.2018 Korrekturen (TooWaBoo) RT 5.4 -#66 04.07.2018 Erweiterung (TooWaBoo) RT 5.4 -#67 05.07.2018 Erweiterung (TooWaBoo) RT 5.4 -#68 05.07.2018 Erweiterung (TooWaBoo) RT 5.4 -#69 25.07.2018 Erweiterung (TooWaBoo) RT 5.4 -#70 25.07.2018 Korrekturen (TooWaBoo) RT 5.4 -#71 28.09.2018 Korrekturen (TooWaBoo) RT 5.5 -#72 05.10.2018 Korrekturen (TooWaBoo) RT 5.5 -#73 21.11.2018 Erweiterung (TooWaBoo) RT 5.5 -#74 24.11.2018 Erweiterung (TooWaBoo) RT 5.5 -#75 02.12.2018 Erweiterung (TooWaBoo) RT 5.5 -#76 11.12.2018 Erweiterung (TooWaBoo) RT 5.5 -#77 16.12.2018 Korrektur Farbwähler-Tooltip (TooWaBoo) RT 5.5 -#78 19.01.2019 Erweiterung (TooWaBoo) RT 5.5 -#79 24.02.2019 Erweiterung (TooWaBoo) RT 5.5 -#80 25.03.2019 Erweiterung (TooWaBoo) RT 5.6 -#81 15.04.2019 Erweiterung (TooWaBoo) RT 5.6 -#82 25.05.2019 Erweiterung (TooWaBoo) RT 5.6 -#83 06.07.2019 Erweiterung (TooWaBoo) RT 5.6 -#84 06.10.2019 Erweiterung (TooWaBoo) RT 5.7 -#84 18.07.2019 Erweiterung (TooWaBoo) RT 5.6 -#85 29.07.2022 Erweiterung (marter, mozzihh) RT 5.9 +#001 keenonkites; Aktualisierte Version für 2.3 beta2 +#002 phberlin; basiert auf keenonkites' Erstübersetzung +#003 2007-12-20 +#004 2007-12-22 +#005 2008-01-08 +#006 2008-01-15 +#007 2008-02-20 +#008 2008-12-19 keenonkites, Anpassungen für 2.4beta4 +#009 2008-09-20 keenonkites, Anpassungen für 2.4m2 +#010 2008-04-04 Anpassungen für 2.4 +#011 Leichte Anpassungen (keenonkites/klonk) +#012 Erweiterung (oduis) +#013 Erweiterung (oduis) +#014 Erweiterung (oduis) +#015 Erweiterung (oduis) +#016 2012-12-05 3.0 alpha: Erweiterung und Korrekturen (Metex) +#017 2012-04-29 Erweiterungen und Korrekturen (MaWe) +#018 Erweiterung (oduis) +#019 Erweiterung (oduis) +#020 2013-02-27 Erweiterung (cytrinox) +#021 2013-12-31 Erweiterung (Ingo) +#022 2015-09-04 komplette Überarbeitung (TooWaBoo) +#023 2015-10-24 Retinexübersetzung und Korrekturen (TooWaBoo) +#024 2015-11-01 Korrekturen (TooWaBoo) RT4.2.450 +#025 2015-11-30 Korrekturen (TooWaBoo) RT4.2.507 +#026 2015-12-13 Korrekturen (TooWaBoo) RT4.2.514 +#026 2015-12-22 Korrekturen (TooWaBoo) RT4.2.536 +#027 2016-02-12 Retinexübersetzung (TooWaBoo) RT4.2.730 +#028 2016-03-19 Erweiterung/Korrekturen (TooWaBoo) RT4.2.880 +#029 2016-05-24 Erweiterung/Korrekturen (TooWaBoo) RT4.2.1005 +#030 2016-09-30 Erweiterung/Korrekturen (TooWaBoo) RT4.2.1234 +#031 2016-12-01 Erweiterung/Korrekturen (TooWaBoo) RT4.2.1408 +#032 2016-12-29 Erweiterung/Korrekturen (TooWaBoo) RT4.2.1464 +#033 2017-01-04 Erweiterung/Korrekturen/Soft-Proofing (TooWaBoo) RT4.2.1477 +#034 2017-01-07 IPTC (TooWaBoo) RT4.2.1492 +#035 2017-02-18 AWB bias (TooWaBoo) RT 5.0 r1 +#036 2017-02-23 Korrekturen (TooWaBoo) RT 5.0 r1 +#037 2017-03-06 Dynamisches Profil (TooWaBoo) RT 5.0 r1 +#038 2017-03-26 Pixel-Shift (TooWaBoo) RT 5.0 r1 +#039 06.04.2017 Fast Export (TooWaBoo) RT 5.0 r1 +#040 30.04.2017 Erweiterung/Korrekturen (TooWaBoo) RT 5.0 r1 +#041 03.05.2017 Erweiterung/Korrekturen (TooWaBoo) RT 5.0 r1 +#042 13.05.2017 Erweiterung (TooWaBoo) RT 5.0 r1 +#043 21.07.2017 Erweiterung (TooWaBoo) RT 5.1 +#044 21.09.2017 Erweiterung (TooWaBoo) RT 5.2 +#045 15.10.2017 Erweiterung (TooWaBoo) RT 5.3 +#046 18.10.2017 Erweiterung (TooWaBoo) RT 5.3 +#047 19.11.2017 HDR-Dynamikkompression (TooWaBoo) RT 5.3 +#048 13.12.2017 Erweiterung (TooWaBoo) RT 5.3 +#049 21.12.2017 Lokaler Kontrast (TooWaBoo) RT 5.3 +#050 07.01.2018 Crop Settings (TooWaBoo) RT 5.3 +#051 10.02.2018 Erweiterung (TooWaBoo) RT 5.3 +#052 10.02.2018 Korrektur (TooWaBoo) RT 5.3 +#053 26.02.2018 Erweiterung (TooWaBoo) RT 5.3 +#054 30.03.2018 Erweiterung (TooWaBoo) RT 5.4 +#055 06.04.2018 Erweiterung (TooWaBoo) RT 5.4 +#056 27.04.2018 Erweiterung (TooWaBoo) RT 5.4 +#057 17.05.2018 Erweiterung (TooWaBoo) RT 5.4 +#058 19.05.2018 Erweiterung (TooWaBoo) RT 5.4 +#059 29.05.2018 Erweiterung (TooWaBoo) RT 5.4 +#060 14.06.2018 Erweiterung (TooWaBoo) RT 5.4 +#061 14.06.2018 Korrektur (TooWaBoo) RT 5.4 +#062 22.06.2018 Korrektur (TooWaBoo) RT 5.4 +#063 24.06.2018 DCB/RCD+VNG4 (TooWaBoo) RT 5.4 +#064 24.06.2018 Erweiterung/Korrektur (TooWaBoo) RT 5.4 +#065 25.06.2018 Korrekturen (TooWaBoo) RT 5.4 +#066 04.07.2018 Erweiterung (TooWaBoo) RT 5.4 +#067 05.07.2018 Erweiterung (TooWaBoo) RT 5.4 +#068 05.07.2018 Erweiterung (TooWaBoo) RT 5.4 +#069 25.07.2018 Erweiterung (TooWaBoo) RT 5.4 +#070 25.07.2018 Korrekturen (TooWaBoo) RT 5.4 +#071 28.09.2018 Korrekturen (TooWaBoo) RT 5.5 +#072 05.10.2018 Korrekturen (TooWaBoo) RT 5.5 +#073 21.11.2018 Erweiterung (TooWaBoo) RT 5.5 +#074 24.11.2018 Erweiterung (TooWaBoo) RT 5.5 +#075 02.12.2018 Erweiterung (TooWaBoo) RT 5.5 +#076 11.12.2018 Erweiterung (TooWaBoo) RT 5.5 +#077 16.12.2018 Korrektur Farbwähler-Tooltip (TooWaBoo) RT 5.5 +#078 19.01.2019 Erweiterung (TooWaBoo) RT 5.5 +#079 24.02.2019 Erweiterung (TooWaBoo) RT 5.5 +#080 25.03.2019 Erweiterung (TooWaBoo) RT 5.6 +#081 15.04.2019 Erweiterung (TooWaBoo) RT 5.6 +#082 25.05.2019 Erweiterung (TooWaBoo) RT 5.6 +#083 06.07.2019 Erweiterung (TooWaBoo) RT 5.6 +#084 06.10.2019 Erweiterung (TooWaBoo) RT 5.7 +#084 18.07.2019 Erweiterung (TooWaBoo) RT 5.6 +#085 29.07.2022 Erweiterung (marter, mozzihh) RT 5.9 +#100 +#101 @LANGUAGE_DISPLAY_NAME=Deutsch ABOUT_TAB_BUILD;Version ABOUT_TAB_CREDITS;Danksagungen diff --git a/rtdata/languages/Espanol (Castellano) b/rtdata/languages/Espanol (Castellano) index ede64894f..54e3d1157 100644 --- a/rtdata/languages/Espanol (Castellano) +++ b/rtdata/languages/Espanol (Castellano) @@ -1,5 +1,7 @@ -#01 Español - Castellano -#02 2022-10-08 Francisco Lorés y Javier Bartol, para la versión 5.9 +#001 Español - Castellano +#002 2022-10-08 Francisco Lorés y Javier Bartol, para la versión 5.9 +#100 +#101 @LANGUAGE_DISPLAY_NAME=Español (Castellano) ABOUT_TAB_BUILD;Versión ABOUT_TAB_CREDITS;Reconocimientos diff --git a/rtdata/languages/Espanol (Latin America) b/rtdata/languages/Espanol (Latin America) index 56a73d30f..58556af85 100644 --- a/rtdata/languages/Espanol (Latin America) +++ b/rtdata/languages/Espanol (Latin America) @@ -1,66 +1,68 @@ -#01 Latin America - Spanish -#02 Conventions used to keep the same writing style along new texts and versions -#03 -#04 Abreviaturas (Abbreviations) -#05 ----------------------------- -#06 AC: Aberración cromática (fringe) -#07 B&N: Blanco y Negro (Black & White) -#08 CV: Corrección de Viñeteado (Vignette Filter: in Transform tab) -#09 FG: Filtro Graduado (Gradient Filter) -#10 FV: Filtrar Viñeteado (Vignette Filter: in Exposure tab) -#11 MC: Mezclador de canales (Channel Mixer) -#12 RGB: Modelo de color Rojo Verde Azul (Red Green Blue) -#13 WB: Balance de blancos (White Balance) -#14 -#15 Convención de traducción de términos importantes, -#16 sin equivalente estándar o poco conocidos en español: -#17 --------------------------------------------- -#18 Artifacts: Elementos extraños -#19 Brightness: Brillo -#20 Checkbox: Casilla (seleccionada/desmarcada) -#21 Chroma: Crominancia (**, definida en es.wikipedia) -#22 Chromatic: Cromática (*) -#23 Chromaticity: Cromaticidad (**) -#24 Colorfulness: Colorido -#25 Cyan: Cian (*) -#26 Dark Frame: Toma Negra -#27 Dim: Luz tenue -#28 Feather: Difuminado -#29 Illuminant: Iluminante -#30 Lightness: Claridad -#31 Luminance: Luminancia (*) -#32 Luminosity: Luminosidad -#33 Mapping: Mapeo (*) -#34 Sharpening: Enfoque -#35 Slider: Control deslizante -#36 Tone Curve: Curva tonal -#37 Vibrance: Vibranza -#38 -#39 (*) Término incluido en diccionario RAE -#40 (**) Término no incluido en diccionario RAE -#41 -#42 Términos conservados en Inglés por no tener traducción breve -#43 al español en el sentido usado por RT/fotografía digital -#44 ----------------------------------------------------- -#45 ICM (Image Color Management) -#46 Gamut -#47 Gamma -#48 Raw -#49 -#50 2008-01-15 keenonkites, first translation -#51 2008-03-03 Ioritz Ibarguren, corrections -#52 2008-04-05 keenonkites, completed for 2.4m1 -#53 2008-04-09 Ramon, partly corrected (part of 2.3) -#54 2008-04-29 Ramon, small correction -#55 2008-06-09 Ramon, Adaptions regarding 2.4m1 and others -#56 2008-09-20 keenonkites, first version for 2.4m2 -#57 2008-12-19 keenonkites, first version for 2.4beta4 -#58 2010-12-07 rickydh, some translations of untranslated keys for 3.0 alpha1 -#59 2011-12-25 plores, translation improvement, translation of untranslated strings -#60 2013-01-03 OdeLama, translation for v4.0.12 of untranslated/changed strings -#61 2014-01-14 mapelo, bug correction and small enhancements. -#62 2014-10-10 fotger -#63 2018-12-09 Faber777 +#001 Latin America - Spanish +#002 Conventions used to keep the same writing style along new texts and versions +#003 +#004 Abreviaturas (Abbreviations) +#005 ----------------------------- +#006 AC: Aberración cromática (fringe) +#007 B&N: Blanco y Negro (Black & White) +#008 CV: Corrección de Viñeteado (Vignette Filter: in Transform tab) +#009 FG: Filtro Graduado (Gradient Filter) +#010 FV: Filtrar Viñeteado (Vignette Filter: in Exposure tab) +#011 MC: Mezclador de canales (Channel Mixer) +#012 RGB: Modelo de color Rojo Verde Azul (Red Green Blue) +#013 WB: Balance de blancos (White Balance) +#014 +#015 Convención de traducción de términos importantes, +#016 sin equivalente estándar o poco conocidos en español: +#017 --------------------------------------------- +#018 Artifacts: Elementos extraños +#019 Brightness: Brillo +#020 Checkbox: Casilla (seleccionada/desmarcada) +#021 Chroma: Crominancia (**, definida en es.wikipedia) +#022 Chromatic: Cromática (*) +#023 Chromaticity: Cromaticidad (**) +#024 Colorfulness: Colorido +#025 Cyan: Cian (*) +#026 Dark Frame: Toma Negra +#027 Dim: Luz tenue +#028 Feather: Difuminado +#029 Illuminant: Iluminante +#030 Lightness: Claridad +#031 Luminance: Luminancia (*) +#032 Luminosity: Luminosidad +#033 Mapping: Mapeo (*) +#034 Sharpening: Enfoque +#035 Slider: Control deslizante +#036 Tone Curve: Curva tonal +#037 Vibrance: Vibranza +#038 +#039 (*) Término incluido en diccionario RAE +#040 (**) Término no incluido en diccionario RAE +#041 +#042 Términos conservados en Inglés por no tener traducción breve +#043 al español en el sentido usado por RT/fotografía digital +#044 ----------------------------------------------------- +#045 ICM (Image Color Management) +#046 Gamut +#047 Gamma +#048 Raw +#049 +#050 2008-01-15 keenonkites, first translation +#051 2008-03-03 Ioritz Ibarguren, corrections +#052 2008-04-05 keenonkites, completed for 2.4m1 +#053 2008-04-09 Ramon, partly corrected (part of 2.3) +#054 2008-04-29 Ramon, small correction +#055 2008-06-09 Ramon, Adaptions regarding 2.4m1 and others +#056 2008-09-20 keenonkites, first version for 2.4m2 +#057 2008-12-19 keenonkites, first version for 2.4beta4 +#058 2010-12-07 rickydh, some translations of untranslated keys for 3.0 alpha1 +#059 2011-12-25 plores, translation improvement, translation of untranslated strings +#060 2013-01-03 OdeLama, translation for v4.0.12 of untranslated/changed strings +#061 2014-01-14 mapelo, bug correction and small enhancements. +#062 2014-10-10 fotger +#063 2018-12-09 Faber777 +#100 +#101 @LANGUAGE_DISPLAY_NAME=Español (Latinoamericano) ABOUT_TAB_BUILD;Versión ABOUT_TAB_CREDITS;Créditos diff --git a/rtdata/languages/Francais b/rtdata/languages/Francais index b7b2c7ec7..25fb12904 100644 --- a/rtdata/languages/Francais +++ b/rtdata/languages/Francais @@ -1,4 +1,6 @@ -#01 2008-03-01 Initial translation by Hombre +#001 2008-03-01 Initial translation by Hombre +#100 +#101 @LANGUAGE_DISPLAY_NAME=Français ABOUT_TAB_BUILD;Version ABOUT_TAB_CREDITS;Crédits diff --git a/rtdata/languages/Italiano b/rtdata/languages/Italiano index e4447f7f6..9c4e607bc 100644 --- a/rtdata/languages/Italiano +++ b/rtdata/languages/Italiano @@ -1,8 +1,10 @@ -#01 2008-01-19 v2.3 breek -#02 2008-11-01 v2.4 pantaraf, chelidon, roberto -#03 2011-08-26 v3.0 joker, chelidon, ffsup2 -#04 2011-08-31 v4.0 chelidon, ffsup2 -#05 2014-04-21 crx +#001 2008-01-19 v2.3 breek +#002 2008-11-01 v2.4 pantaraf, chelidon, roberto +#003 2011-08-26 v3.0 joker, chelidon, ffsup2 +#004 2011-08-31 v4.0 chelidon, ffsup2 +#005 2014-04-21 crx +#100 +#101 @LANGUAGE_DISPLAY_NAME=Italiano ABOUT_TAB_BUILD;Versione ABOUT_TAB_CREDITS;Riconoscimenti diff --git a/rtdata/languages/Japanese b/rtdata/languages/Japanese index 0f35036db..fa403c2d9 100644 --- a/rtdata/languages/Japanese +++ b/rtdata/languages/Japanese @@ -1,4 +1,6 @@ -#Last update 10-12-2022 +#001 Last update 10-12-2022 +#100 +#101 @LANGUAGE_DISPLAY_NAME=日本語 ABOUT_TAB_BUILD;バージョン ABOUT_TAB_CREDITS;クレジット diff --git a/rtdata/languages/Magyar b/rtdata/languages/Magyar index 6283dbe4b..b79be1e4e 100644 --- a/rtdata/languages/Magyar +++ b/rtdata/languages/Magyar @@ -1,4 +1,6 @@ -#01 2010-11-20 RT 3.0 alpha 1 rev. 597:fb291bf74c by Dr. Gyurkó M. 'dualon' Dávid +#001 2010-11-20 RT 3.0 alpha 1 rev. 597:fb291bf74c by Dr. Gyurkó M. 'dualon' Dávid +#100 +#101 @LANGUAGE_DISPLAY_NAME=Magyar ABOUT_TAB_BUILD;Verzió ABOUT_TAB_CREDITS;Szerzők diff --git a/rtdata/languages/Nederlands b/rtdata/languages/Nederlands index 63eaeccc6..3e6dc5621 100644 --- a/rtdata/languages/Nederlands +++ b/rtdata/languages/Nederlands @@ -1,20 +1,22 @@ -#01 2007-12-26 Rens Duijsens en Brent Huisman -#02 2008-03-14 updated by reggybe -#03 2009-02-01 updated to RT2.4-RC by paul.matthijsse -#04 2010-05-02 updated to rt3a1 by paul.matthijsse -#05 2011-03-03 updated to rt3a2 by paul.matthijsse -#06 2011-10-10 updated to rt4.0 by wim ter meer -#07 2011-11-28 updated by pm -#08 2012-05-17 updated to rt4.0.8 by wim ter meer -#09 2013-03-27 updated to rt4.0.10 by wim ter meer -#10 2013-11-27 updated to rt4.0.11 by wim ter meer -#11 2014-03-24 updated to rt4.1 by wim ter meer -#12 2014-10-19 updated to rt4.1.92 by wim ter meer -#13 2015-03-03 updated to rt4.2.102 by wim ter meer -#14 2015-11-23 update by wim ter meer -#15 2016-07-21 update by wim ter meer -#16 2017-04-21 update by wim ter meer -#17 2020-06-05 update by dheijl +#001 2007-12-26 Rens Duijsens en Brent Huisman +#002 2008-03-14 updated by reggybe +#003 2009-02-01 updated to RT2.4-RC by paul.matthijsse +#004 2010-05-02 updated to rt3a1 by paul.matthijsse +#005 2011-03-03 updated to rt3a2 by paul.matthijsse +#006 2011-10-10 updated to rt4.0 by wim ter meer +#007 2011-11-28 updated by pm +#008 2012-05-17 updated to rt4.0.8 by wim ter meer +#009 2013-03-27 updated to rt4.0.10 by wim ter meer +#010 2013-11-27 updated to rt4.0.11 by wim ter meer +#011 2014-03-24 updated to rt4.1 by wim ter meer +#012 2014-10-19 updated to rt4.1.92 by wim ter meer +#013 2015-03-03 updated to rt4.2.102 by wim ter meer +#014 2015-11-23 update by wim ter meer +#015 2016-07-21 update by wim ter meer +#016 2017-04-21 update by wim ter meer +#017 2020-06-05 update by dheijl +#100 +#101 @LANGUAGE_DISPLAY_NAME=Nederlands ABOUT_TAB_BUILD;Versie ABOUT_TAB_CREDITS;Credits diff --git a/rtdata/languages/Polish b/rtdata/languages/Polish index 06ed63aba..63d483738 100644 --- a/rtdata/languages/Polish +++ b/rtdata/languages/Polish @@ -1,16 +1,18 @@ -#01 2007-12-24 Mateusz Ludwin -#02 2010-01-08 Bartosz "Simek" Kaszubowski -#03 2011-09-06 Dariusz 'Salvadhor' Duma -#04 2011-11-30 DrSlony -#05 2012-01-14 DrSlony -#06 2012-01-30 DrSlony -#07 2012-04-02 DrSlony -#08 2013-05-21 DrSlony -#09 2014-10-16 DrSlony -#10 2020-02-02 Bartłomiej Wiśniowski -#11 2020-02-02 Bartłomiej Wiśniowski -#12 2020-02-15 Bartłomiej Wiśniowski -#13 2020-02-17 Bartłomiej Wiśniowski +#001 2007-12-24 Mateusz Ludwin +#002 2010-01-08 Bartosz "Simek" Kaszubowski +#003 2011-09-06 Dariusz 'Salvadhor' Duma +#004 2011-11-30 DrSlony +#005 2012-01-14 DrSlony +#006 2012-01-30 DrSlony +#007 2012-04-02 DrSlony +#008 2013-05-21 DrSlony +#009 2014-10-16 DrSlony +#010 2020-02-02 Bartłomiej Wiśniowski +#011 2020-02-02 Bartłomiej Wiśniowski +#012 2020-02-15 Bartłomiej Wiśniowski +#013 2020-02-17 Bartłomiej Wiśniowski +#100 +#101 @LANGUAGE_DISPLAY_NAME=Polski ABOUT_TAB_BUILD;Wersja ABOUT_TAB_CREDITS;Zasługi diff --git a/rtdata/languages/Portugues b/rtdata/languages/Portugues index 09d3aa790..38c0bc8f6 100644 --- a/rtdata/languages/Portugues +++ b/rtdata/languages/Portugues @@ -1,5 +1,7 @@ -#01 2018-07-25 Digitalpix58 -#02 2019-03-11 Xendez +#001 2018-07-25 Digitalpix58 +#002 2019-03-11 Xendez +#100 +#101 @LANGUAGE_DISPLAY_NAME=Português ABOUT_TAB_BUILD;Versão ABOUT_TAB_CREDITS;Créditos diff --git a/rtdata/languages/Portugues (Brasil) b/rtdata/languages/Portugues (Brasil) index cf386f5ff..afbd0b6b1 100644 --- a/rtdata/languages/Portugues (Brasil) +++ b/rtdata/languages/Portugues (Brasil) @@ -1,5 +1,7 @@ -#01 2018-07-25 Digitalpix58 -#02 2019-03-12 Xendez +#001 2018-07-25 Digitalpix58 +#002 2019-03-12 Xendez +#100 +#101 @LANGUAGE_DISPLAY_NAME=Português brasileiro ABOUT_TAB_BUILD;Versão ABOUT_TAB_CREDITS;Créditos diff --git a/rtdata/languages/Russian b/rtdata/languages/Russian index 6b0aa6ca0..bd83d2f14 100644 --- a/rtdata/languages/Russian +++ b/rtdata/languages/Russian @@ -1,12 +1,14 @@ -#01 2007-12-23 ArtDen -#02 2008-07-20 Denis Artemov -#03 2009-02-16 Kvark -#04 2010-02-26 Sergey Smirnov AKA smiserg -#05 2010-11-01 Ilia Popov -#06 2012-07-17 Roman Milanskij -#07 2014-02-12 Kostia (Kildor) Romanov -#08 2018-02-10 Kostia (Kildor) Romanov -#09 2018-12-13 Kostia (Kildor) Romanov +#001 2007-12-23 ArtDen +#002 2008-07-20 Denis Artemov +#003 2009-02-16 Kvark +#004 2010-02-26 Sergey Smirnov AKA smiserg +#005 2010-11-01 Ilia Popov +#006 2012-07-17 Roman Milanskij +#007 2014-02-12 Kostia (Kildor) Romanov +#008 2018-02-10 Kostia (Kildor) Romanov +#009 2018-12-13 Kostia (Kildor) Romanov +#100 +#101 @LANGUAGE_DISPLAY_NAME=Русский ABOUT_TAB_BUILD;Версия ABOUT_TAB_CREDITS;Авторы diff --git a/rtdata/languages/Serbian (Cyrilic Characters) b/rtdata/languages/Serbian (Cyrilic Characters) index 2c48f771b..be6dfb500 100644 --- a/rtdata/languages/Serbian (Cyrilic Characters) +++ b/rtdata/languages/Serbian (Cyrilic Characters) @@ -1,4 +1,6 @@ -#01 2010-11-16 gpopac +#001 2010-11-16 gpopac +#100 +#101 @LANGUAGE_DISPLAY_NAME=српски ABOUT_TAB_BUILD;Издање ABOUT_TAB_CREDITS;Заслуге diff --git a/rtdata/languages/Slovenian b/rtdata/languages/Slovenian index f3d71c543..1954b1c05 100644 --- a/rtdata/languages/Slovenian +++ b/rtdata/languages/Slovenian @@ -1,4 +1,6 @@ -#01 2019-10-05 Matjaž Jeran +#001 2019-10-05 Matjaž Jeran +#100 +#101 @LANGUAGE_DISPLAY_NAME=Slovenščina ABOUT_TAB_BUILD;Verzija ABOUT_TAB_CREDITS;Zasluge diff --git a/rtdata/languages/Swedish b/rtdata/languages/Swedish index de612ad73..16fb9f3f1 100644 --- a/rtdata/languages/Swedish +++ b/rtdata/languages/Swedish @@ -1,7 +1,9 @@ -#01 2008-01-22 Emil Ericsson -#02 2010-2013 Updated by Johan Thor -#03 2015-08-09 Johan Thor -#04 2016-12-30 Johan Thor +#001 2008-01-22 Emil Ericsson +#002 2010-2013 Updated by Johan Thor +#003 2015-08-09 Johan Thor +#004 2016-12-30 Johan Thor +#100 +#101 @LANGUAGE_DISPLAY_NAME=Svenska ABOUT_TAB_BUILD;Version ABOUT_TAB_CREDITS;Erkännande diff --git a/rtgui/multilangmgr.cc b/rtgui/multilangmgr.cc index 13f2569c5..2e093e6eb 100644 --- a/rtgui/multilangmgr.cc +++ b/rtgui/multilangmgr.cc @@ -20,6 +20,8 @@ #include #include +#include +#include #ifdef WIN32 #include #include @@ -28,6 +30,8 @@ #include #endif +#include "../rtengine/settings.h" + namespace { @@ -162,6 +166,25 @@ void setGtkLanguage(const Glib::ustring &language) } +TranslationMetadata::TranslationMetadata(std::map &&metadata) : + metadata(std::move(metadata)) +{ +} + +std::string TranslationMetadata::get(const std::string &key, const std::string &default_value) const +{ + const auto found_entry = metadata.find(key); + if (found_entry == metadata.end()) { + return default_value; + } + return found_entry->second; +} + +std::string TranslationMetadata::getLanguageName(const std::string &default_name) const +{ + return get("LANGUAGE_DISPLAY_NAME", default_name); +} + MultiLangMgr langMgr; MultiLangMgr::MultiLangMgr () @@ -219,6 +242,77 @@ Glib::ustring MultiLangMgr::getStr (const std::string& key) const return key; } +const TranslationMetadata *MultiLangMgr::getMetadata(const Glib::ustring &fname) const +{ + static const char comment_symbol = '#'; + static const char *space_chars = " \t"; + static const char var_symbol = '@'; + static const char key_value_separator = '='; + + // Look for the metadata in the cache. + const auto &found_metadata = lang_files_metadata.find(fname); + if (found_metadata != lang_files_metadata.end()) { + return &found_metadata->second; + } + + std::ifstream file(fname.c_str()); + if (!file.is_open()) { + if (rtengine::settings->verbose) { + std::cerr << "Unable to open language file " << fname << " to get metadata." << std::endl; + } + return nullptr; + } + + if (rtengine::settings->verbose) { + std::cout << "Reading metadata from language file " << fname << std::endl; + } + std::map raw_metadata; + const auto read_key_value = [&raw_metadata](const std::string &meta_line) { + // One metadata key-value pair per line. The format is as follows: + // #001 @KEY=VALUE + // The line must begin with the comment symbol (#). After the first + // sequence of whitespace characters, the metadata variable symbol (@) + // must appear. It is followed immediately with the key name. The end of + // the key name is marked with the equal sign (=). All remaining + // characters until the end of the line make up the metadata value. + if (meta_line.empty() || meta_line.front() != comment_symbol) { + return; + } + const auto first_space = meta_line.find_first_of(space_chars, 1); + if (first_space == std::string::npos) { + return; + } + const auto definition_start = meta_line.find_first_not_of(space_chars, first_space + 1); + if (definition_start == std::string::npos || meta_line[definition_start] != var_symbol) { + return; + } + const auto separator_pos = meta_line.find(key_value_separator, definition_start + 1); + if (separator_pos == std::string::npos) { + return; + } + std::string key = meta_line.substr(definition_start + 1, separator_pos - definition_start - 1); + std::string value = meta_line.substr(separator_pos + 1); + if (rtengine::settings->verbose) { + std::cout << "Found metadata key " << key << " with value " << value << std::endl; + } + raw_metadata.emplace(std::move(key), std::move(value)); + }; + + // Read lines in order. Metadata only appear in the first section of each + // file. + for ( + std::string line; + std::getline(file, line) && (line.empty() || + line.front() == comment_symbol || + line.find_first_not_of(space_chars) == std::string::npos);) { + read_key_value(line); + } + + // Add metadata to cache and return. + lang_files_metadata[fname] = TranslationMetadata(std::move(raw_metadata)); + return &lang_files_metadata[fname]; +} + bool MultiLangMgr::isOSLanguageDetectSupported () { #if defined (WIN32) || defined (__linux__) || defined (__APPLE__) diff --git a/rtgui/multilangmgr.h b/rtgui/multilangmgr.h index 902161eb2..27ece9fb8 100644 --- a/rtgui/multilangmgr.h +++ b/rtgui/multilangmgr.h @@ -24,6 +24,25 @@ #include +class TranslationMetadata +{ +public: + TranslationMetadata() = default; + ~TranslationMetadata() = default; + TranslationMetadata(const TranslationMetadata &other) = delete; + TranslationMetadata(TranslationMetadata &&other) = delete; + explicit TranslationMetadata(std::map &&metadata); + + TranslationMetadata &operator =(const TranslationMetadata &other) = delete; + TranslationMetadata &operator =(TranslationMetadata &&other) noexcept = default; + + std::string get(const std::string &key, const std::string &default_value) const; + std::string getLanguageName(const std::string &default_name) const; + +private: + std::map metadata; +}; + class MultiLangMgr { public: @@ -31,11 +50,13 @@ public: void load(const Glib::ustring &language, const std::vector &fnames); Glib::ustring getStr(const std::string& key) const; + const TranslationMetadata *getMetadata(const Glib::ustring &fname) const; static bool isOSLanguageDetectSupported(); static Glib::ustring getOSUserLanguage(); private: std::map translations; + mutable std::map lang_files_metadata; }; extern MultiLangMgr langMgr; diff --git a/rtgui/preferences.cc b/rtgui/preferences.cc index c9737704e..2610765f4 100644 --- a/rtgui/preferences.cc +++ b/rtgui/preferences.cc @@ -16,21 +16,27 @@ * You should have received a copy of the GNU General Public License * along with RawTherapee. If not, see . */ +#include + +#include +#include #include -#include "externaleditorpreferences.h" -#include "preferences.h" -#include "multilangmgr.h" -#include "splash.h" -#include "cachemanager.h" + #include "addsetids.h" +#include "cachemanager.h" +#include "externaleditorpreferences.h" +#include "multilangmgr.h" +#include "preferences.h" +#include "rtimage.h" +#include "rtwindow.h" +#include "splash.h" +#include "toollocationpref.h" + #include "../rtengine/dfmanager.h" #include "../rtengine/ffmanager.h" #include "../rtengine/iccstore.h" #include "../rtengine/procparams.h" -#include -#include "rtimage.h" -#include "rtwindow.h" -#include "toollocationpref.h" + #ifdef _OPENMP #include #endif @@ -1095,9 +1101,14 @@ Gtk::Widget* Preferences::getGeneralPanel() std::vector langs; parseDir(argv0 + "/languages", langs, ""); - for (size_t i = 0; i < langs.size(); i++) { - if ("default" != langs[i] && "README" != langs[i] && "LICENSE" != langs[i]) { - languages->append(langs[i]); + for (const auto &lang : langs) { + if ("default" != lang && "README" != lang && "LICENSE" != lang) { + auto lang_metadata = langMgr.getMetadata(Glib::build_filename(argv0 + "/languages", lang)); + const auto &display_name = + lang_metadata != nullptr + ? Glib::ustring(lang_metadata->getLanguageName(lang)) + : lang; + languages->append(lang, display_name); } } @@ -1721,7 +1732,7 @@ void Preferences::storePreferences() moptions.menuGroupExtProg = ckbmenuGroupExtProg->get_active(); moptions.highlightThreshold = (int)hlThresh->get_value(); moptions.shadowThreshold = (int)shThresh->get_value(); - moptions.language = languages->get_active_text(); + moptions.language = languages->get_active_id(); moptions.languageAutoDetect = ckbLangAutoDetect->get_active(); moptions.theme = themeFNames.at (themeCBT->get_active_row_number ()).longFName; @@ -1997,7 +2008,7 @@ void Preferences::fillPreferences() } cprevdemo->set_active (moptions.prevdemo); - languages->set_active_text(moptions.language); + languages->set_active_id(moptions.language); ckbLangAutoDetect->set_active(moptions.languageAutoDetect); int themeNbr = getThemeRowNumber(moptions.theme); themeCBT->set_active (themeNbr == -1 ? 0 : themeNbr);