From ebe48a177bbdc7442efc3e8ab25118b95458c43e Mon Sep 17 00:00:00 2001 From: Damien Date: Tue, 8 Nov 2022 09:46:24 +1100 Subject: [PATCH] Update and expand ton measurement. Update translations --- plugin.json | 2 +- .../translations/en/LC_MESSAGES/messages.mo | Bin 4131 -> 4313 bytes .../translations/en/LC_MESSAGES/messages.po | 53 ++++++++++++------ .../translations/zh/LC_MESSAGES/messages.mo | Bin 3906 -> 4081 bytes .../translations/zh/LC_MESSAGES/messages.po | 53 ++++++++++++------ plugin/units.py | 22 ++++++-- 6 files changed, 93 insertions(+), 37 deletions(-) diff --git a/plugin.json b/plugin.json index 68c1122..3b18e46 100644 --- a/plugin.json +++ b/plugin.json @@ -4,7 +4,7 @@ "Name": "General Converter", "Description": "General weights and measures converter", "Author": "deefrawley", - "Version": "1.1.3", + "Version": "1.1.4", "Language": "python", "Website": "https://github.com/deefrawley/Flow.Launcher.Plugin.GenConvert", "IcoPath": "assets/favicon.ico", diff --git a/plugin/translations/en/LC_MESSAGES/messages.mo b/plugin/translations/en/LC_MESSAGES/messages.mo index 804edba27f69ef7d3117a1c30a2505684245a51c..61586549d27577a3a97aa1c16792a33a9285563a 100644 GIT binary patch literal 4313 zcmeH|Ux-vy9LG2f{3W^_uex*v)OwuyWBmW^ZT9O z?{|K`-#K&d4|8W65%_xs{|otlGlrJGg|mbxLS6*U2M57hzzVn+jKBrp5pXtm8q9$o zfwzL^!MngO!FKR6csqCv#3TO1z?d(Y_tz`aF>94}k2?auAQ`#K3dy z1LuM}LFTdBa?J82koz72*}r2T{Z4^AuXA?&3y}WbTKyF(U$^q#AoFWS(LBGoAoE)S z&I4D0+-DQW_>Y5WJ|OcO1G(QTAmbbbS?4j3eLZ3IC&4zz?}D%0B*Ynz_rDL$yeH!z z`*#Rj3?2n}|33lQr%NDQ#E&3S7C(W^=XVf~n2jWv=X?y@|3Q%VewpQ?R$m6W ( z$UL6~ng2eJ`y2pS=c^#&9|IZpZ4i$*je&8_g7p6kWdAOJ?B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jB#R zQ2sl-KJ;?p<$Iy>I{`ba|edKpwbFMx`B zDb&5T(2U%a7JJpT)NLxw4V0+riYRX8qnUio@Npv$ZtY z>$04w+-z`h9<|_{tL?G%wAO04q-guiq?rwCHPFhsCfAUA z+&%7pY4VOyd8B^2JP$uEi`X+}`(9e8+P@SFChcN)dtZ)@q;mF*7kuW!tlpW>n291y zoGHTH{05sTzs7C>dzEY$k@Jzw2__w#EL`}{`HrS%ws!?TUEX^VF=c-3#Q5d$v%HIY z7i_5qx3%Ajs_s>Q$8)U_K7DnmhK7?OBRG++Jy~i?8xNgx;Pq0v)Qr! zt#OMtD%g}}jl61;W+~>QLu+k&IJz>iSB%=qb^TLYrY5?DQB`=@3hrYtJ>O)h!tE=r zZ^mJithKedFw0#r+A3y()m=Mnf(JC1NNQ=FXRm5k?~aQ8_Cv{w8;s9a?YJ(79U53O iQ0ZTM^cNp}UjD^Lzw;mOU)k>8z`|R*_~`$yNB?h&5gEJy diff --git a/plugin/translations/en/LC_MESSAGES/messages.po b/plugin/translations/en/LC_MESSAGES/messages.po index 6e021ed..e2b0cf6 100644 --- a/plugin/translations/en/LC_MESSAGES/messages.po +++ b/plugin/translations/en/LC_MESSAGES/messages.po @@ -5,9 +5,9 @@ # msgid "" msgstr "" -"Project-Id-Version: 1.1.0\n" +"Project-Id-Version: 1.1.3\n" "Report-Msgid-Bugs-To: deefrawley@gmail.com\n" -"POT-Creation-Date: 2021-09-09 13:07+1000\n" +"POT-Creation-Date: 2022-11-08 09:22+1100\n" "PO-Revision-Date: 2020-12-13 20:26+1100\n" "Last-Translator: deefrawley \n" "Language: en\n" @@ -18,31 +18,31 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.9.1\n" -#: plugin/ui.py:46 plugin/ui.py:100 +#: plugin/ui.py:48 plugin/ui.py:108 msgid "General Converter" msgstr "General Converter" -#: plugin/ui.py:47 plugin/ui.py:101 +#: plugin/ui.py:49 plugin/ui.py:109 msgid " " msgstr " " -#: plugin/ui.py:65 +#: plugin/ui.py:67 msgid "Available conversions" msgstr "Available conversions" -#: plugin/ui.py:79 +#: plugin/ui.py:81 msgid "{}" msgstr "{}" -#: plugin/ui.py:80 +#: plugin/ui.py:82 msgid "Choose two different units" msgstr "Choose two different units" -#: plugin/ui.py:85 plugin/ui.py:96 +#: plugin/ui.py:87 plugin/ui.py:104 msgid "Error - {}" msgstr "Error - {}" -#: plugin/ui.py:86 +#: plugin/ui.py:88 msgid "Check documentation for accepted units" msgstr "Check documentation for accepted units" @@ -354,27 +354,48 @@ msgstr "ounces" msgid "stone" msgstr "stone" -#: plugin/units.py:168 plugin/units.py:169 -msgid "ton" -msgstr "ton" +#: plugin/units.py:168 +msgid "tonne" +msgstr "tonne" + +#: plugin/units.py:169 +msgid "tonnes" +msgstr "tonnes" + +#: plugin/units.py:175 +msgid "US ton" +msgstr "US ton" #: plugin/units.py:176 +msgid "US tons" +msgstr "US tons" + +#: plugin/units.py:182 +msgid "Imperial ton" +msgstr "Imperial ton" + +#: plugin/units.py:183 +msgid "Imperial tons" +msgstr "Imperial tons" + +#: plugin/units.py:190 msgid "Celsius" msgstr "Celsius" -#: plugin/units.py:178 +#: plugin/units.py:192 msgid "Farenheit" msgstr "Farenheit" -#: plugin/units.py:179 +#: plugin/units.py:193 msgid "Kelvin" msgstr "Kelvin" -#: plugin/utils.py:84 +#: plugin/utils.py:82 msgid "To and from unit is the same" msgstr "To and from unit is the same" -#: plugin/utils.py:112 +#: plugin/utils.py:110 msgid "Problem converting {} and {}" msgstr "Problem converting {} and {}" + diff --git a/plugin/translations/zh/LC_MESSAGES/messages.mo b/plugin/translations/zh/LC_MESSAGES/messages.mo index 0669365390d7dbed32a965f5b206d4c63cd57cee..8365bb6d06b1ecc35f669e0ba612abc200ed6003 100644 GIT binary patch delta 1731 zcmYk*X^4$c9LMp)jA5=>xQuNq6Ga)@y_OghlPn=J5y~=UY;i4v$Z{hyl(E!JmLlQB zC>k1(B@HjoNO^%*Orb$!ec=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^KF&7i&=mCr}FyqY^rfv~ZeEPuhsOe+8A$HP7Ec#cQ+esCaKsaXz8ef7O`t!!J)H z5mf;*Pz!TV8w*esDE7F-<8sux3RJ+EsEW)(LWXKo1(qQ#tfkZXO{n#?7}tV2E@+{i zP9-{qdV)sOyKBaLY(*u~X}jzX)WNB2QU&u-`-Y)jSvl%{C2D__=c_YAyk}yiC)T4f ztVO-U9jF8kVF8{+1-gzp;34)Tgi5drb>JUN!EDN>isqu?7U8a>5TZDWaYGjM*M_G= zQAu873BJcD7IIVbG1Ng5kl0~5>PI!#;~MPGcoi1oHdF$~QTtEX^Y)T$iTmP~ePAEk z=cqt0krv+A&-S;CP!_ElfJ!iGhucy+5tYz%8=vEg`F4?AYM0wpcAed5Yf%T++1;Ms zXY1_|d(xikH6AW{qS@ZG_w6Ip6Fsx9>___zmB1gH!VgC4(`}xO+To~5miEZ|pW=zx zcA>4YYwTvb6Lr8rd(87^>}Aj2wr!}Aw|m@aKgb!}`09yno56oj2jttqb_D84W2k`R z?c_ve+TFy*w2G$5>GM(&`y<0rVq?Z8E=MYJ%SOj0(uS6en-rTcvMkmV$$F8L_?bPe VX;#jj\n" "Language: zh\n" @@ -18,31 +18,31 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.9.1\n" -#: plugin/ui.py:46 plugin/ui.py:100 +#: plugin/ui.py:48 plugin/ui.py:108 msgid "General Converter" msgstr "通用单位换算器" -#: plugin/ui.py:47 plugin/ui.py:101 +#: plugin/ui.py:49 plugin/ui.py:109 msgid " " msgstr "<热键> <量> <源单元> <目的地单位>" -#: plugin/ui.py:65 +#: plugin/ui.py:67 msgid "Available conversions" msgstr "可用转换" -#: plugin/ui.py:79 +#: plugin/ui.py:81 msgid "{}" msgstr "" -#: plugin/ui.py:80 +#: plugin/ui.py:82 msgid "Choose two different units" msgstr "选择两个不同的单位" -#: plugin/ui.py:85 plugin/ui.py:96 +#: plugin/ui.py:87 plugin/ui.py:104 msgid "Error - {}" msgstr "错误 - {}" -#: plugin/ui.py:86 +#: plugin/ui.py:88 msgid "Check documentation for accepted units" msgstr "检查文档以获取正确的度量单位" @@ -354,27 +354,48 @@ msgstr "盎司" msgid "stone" msgstr "石头" -#: plugin/units.py:168 plugin/units.py:169 -msgid "ton" -msgstr "吨" +#: plugin/units.py:168 +msgid "tonne" +msgstr "公吨" + +#: plugin/units.py:169 +msgid "tonnes" +msgstr "公吨" + +#: plugin/units.py:175 +msgid "US ton" +msgstr "美吨" #: plugin/units.py:176 +msgid "US tons" +msgstr "美吨" + +#: plugin/units.py:182 +msgid "Imperial ton" +msgstr "英制吨" + +#: plugin/units.py:183 +msgid "Imperial tons" +msgstr "英制吨" + +#: plugin/units.py:190 msgid "Celsius" msgstr "摄氏" -#: plugin/units.py:178 +#: plugin/units.py:192 msgid "Farenheit" msgstr "华氏度" -#: plugin/units.py:179 +#: plugin/units.py:193 msgid "Kelvin" msgstr "开尔文" -#: plugin/utils.py:84 +#: plugin/utils.py:82 msgid "To and from unit is the same" msgstr "源单元和目标单元相同" -#: plugin/utils.py:112 +#: plugin/utils.py:110 msgid "Problem converting {} and {}" msgstr "转换问题 {} 和 {}" + diff --git a/plugin/units.py b/plugin/units.py index 9c9a29c..fe222c5 100644 --- a/plugin/units.py +++ b/plugin/units.py @@ -163,12 +163,26 @@ ["lb", _("pound"), _("pounds"), "x / 0.002205", "x * 0.002205"], ["oz", _("ounce"), _("ounces"), "x / 0.035274", " 0.035274"], ["st", _("stone"), _("stone"), "x / 0.000157473", "x * 0.000157473"], + [ + "t", + _("tonne"), + _("tonnes"), + "x / 0.000001", + "x * 0.000001", + ], [ "ton", - _("ton"), - _("ton"), - "x / 0.000001102310999995", - "x * 0.000001102310999995", + _("US ton"), + _("US tons"), + "x / 0.0000011023109950010196", + "x * 0.0000011023109950010196", + ], + [ + "tonimp", + _("Imperial ton"), + _("Imperial tons"), + "x / 0.00000098421", + "x * 0.00000098421", ], ], "Temperature": [