Skip to content

Commit f8b4c85

Browse files
authored
Merge pull request #15 from deefrawley/tonneupdate
Update and expand ton measurement. Update translations. Fixes #14
2 parents 2597fde + ebe48a1 commit f8b4c85

File tree

6 files changed

+93
-37
lines changed

6 files changed

+93
-37
lines changed

plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"Name": "General Converter",
55
"Description": "General weights and measures converter",
66
"Author": "deefrawley",
7-
"Version": "1.1.3",
7+
"Version": "1.1.4",
88
"Language": "python",
99
"Website": "https://github.com/deefrawley/Flow.Launcher.Plugin.GenConvert",
1010
"IcoPath": "assets/favicon.ico",
182 Bytes
Binary file not shown.

plugin/translations/en/LC_MESSAGES/messages.po

Lines changed: 37 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
#
66
msgid ""
77
msgstr ""
8-
"Project-Id-Version: 1.1.0\n"
8+
"Project-Id-Version: 1.1.3\n"
99
"Report-Msgid-Bugs-To: deefrawley@gmail.com\n"
10-
"POT-Creation-Date: 2021-09-09 13:07+1000\n"
10+
"POT-Creation-Date: 2022-11-08 09:22+1100\n"
1111
"PO-Revision-Date: 2020-12-13 20:26+1100\n"
1212
"Last-Translator: deefrawley <deefrawley@gmail.com>\n"
1313
"Language: en\n"
@@ -18,31 +18,31 @@ msgstr ""
1818
"Content-Transfer-Encoding: 8bit\n"
1919
"Generated-By: Babel 2.9.1\n"
2020

21-
#: plugin/ui.py:46 plugin/ui.py:100
21+
#: plugin/ui.py:48 plugin/ui.py:108
2222
msgid "General Converter"
2323
msgstr "General Converter"
2424

25-
#: plugin/ui.py:47 plugin/ui.py:101
25+
#: plugin/ui.py:49 plugin/ui.py:109
2626
msgid "<Hotkey> <Amount> <Source unit> <Destination unit>"
2727
msgstr "<Hotkey> <Amount> <Source unit> <Destination unit>"
2828

29-
#: plugin/ui.py:65
29+
#: plugin/ui.py:67
3030
msgid "Available conversions"
3131
msgstr "Available conversions"
3232

33-
#: plugin/ui.py:79
33+
#: plugin/ui.py:81
3434
msgid "{}"
3535
msgstr "{}"
3636

37-
#: plugin/ui.py:80
37+
#: plugin/ui.py:82
3838
msgid "Choose two different units"
3939
msgstr "Choose two different units"
4040

41-
#: plugin/ui.py:85 plugin/ui.py:96
41+
#: plugin/ui.py:87 plugin/ui.py:104
4242
msgid "Error - {}"
4343
msgstr "Error - {}"
4444

45-
#: plugin/ui.py:86
45+
#: plugin/ui.py:88
4646
msgid "Check documentation for accepted units"
4747
msgstr "Check documentation for accepted units"
4848

@@ -354,27 +354,48 @@ msgstr "ounces"
354354
msgid "stone"
355355
msgstr "stone"
356356

357-
#: plugin/units.py:168 plugin/units.py:169
358-
msgid "ton"
359-
msgstr "ton"
357+
#: plugin/units.py:168
358+
msgid "tonne"
359+
msgstr "tonne"
360+
361+
#: plugin/units.py:169
362+
msgid "tonnes"
363+
msgstr "tonnes"
364+
365+
#: plugin/units.py:175
366+
msgid "US ton"
367+
msgstr "US ton"
360368

361369
#: plugin/units.py:176
370+
msgid "US tons"
371+
msgstr "US tons"
372+
373+
#: plugin/units.py:182
374+
msgid "Imperial ton"
375+
msgstr "Imperial ton"
376+
377+
#: plugin/units.py:183
378+
msgid "Imperial tons"
379+
msgstr "Imperial tons"
380+
381+
#: plugin/units.py:190
362382
msgid "Celsius"
363383
msgstr "Celsius"
364384

365-
#: plugin/units.py:178
385+
#: plugin/units.py:192
366386
msgid "Farenheit"
367387
msgstr "Farenheit"
368388

369-
#: plugin/units.py:179
389+
#: plugin/units.py:193
370390
msgid "Kelvin"
371391
msgstr "Kelvin"
372392

373-
#: plugin/utils.py:84
393+
#: plugin/utils.py:82
374394
msgid "To and from unit is the same"
375395
msgstr "To and from unit is the same"
376396

377-
#: plugin/utils.py:112
397+
#: plugin/utils.py:110
378398
msgid "Problem converting {} and {}"
379399
msgstr "Problem converting {} and {}"
380400

401+
175 Bytes
Binary file not shown.

plugin/translations/zh/LC_MESSAGES/messages.po

Lines changed: 37 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
#
66
msgid ""
77
msgstr ""
8-
"Project-Id-Version: 1.0.2\n"
8+
"Project-Id-Version: 1.1.3\n"
99
"Report-Msgid-Bugs-To: deefrawley@gmail.com\n"
10-
"POT-Creation-Date: 2021-09-09 13:07+1000\n"
10+
"POT-Creation-Date: 2022-11-08 09:22+1100\n"
1111
"PO-Revision-Date: 2021-06-07 15:16+1000\n"
1212
"Last-Translator: deefrawley <deefrawley@gmail.com>\n"
1313
"Language: zh\n"
@@ -18,31 +18,31 @@ msgstr ""
1818
"Content-Transfer-Encoding: 8bit\n"
1919
"Generated-By: Babel 2.9.1\n"
2020

21-
#: plugin/ui.py:46 plugin/ui.py:100
21+
#: plugin/ui.py:48 plugin/ui.py:108
2222
msgid "General Converter"
2323
msgstr "通用单位换算器"
2424

25-
#: plugin/ui.py:47 plugin/ui.py:101
25+
#: plugin/ui.py:49 plugin/ui.py:109
2626
msgid "<Hotkey> <Amount> <Source unit> <Destination unit>"
2727
msgstr "<热键> <量> <源单元> <目的地单位>"
2828

29-
#: plugin/ui.py:65
29+
#: plugin/ui.py:67
3030
msgid "Available conversions"
3131
msgstr "可用转换"
3232

33-
#: plugin/ui.py:79
33+
#: plugin/ui.py:81
3434
msgid "{}"
3535
msgstr ""
3636

37-
#: plugin/ui.py:80
37+
#: plugin/ui.py:82
3838
msgid "Choose two different units"
3939
msgstr "选择两个不同的单位"
4040

41-
#: plugin/ui.py:85 plugin/ui.py:96
41+
#: plugin/ui.py:87 plugin/ui.py:104
4242
msgid "Error - {}"
4343
msgstr "错误 - {}"
4444

45-
#: plugin/ui.py:86
45+
#: plugin/ui.py:88
4646
msgid "Check documentation for accepted units"
4747
msgstr "检查文档以获取正确的度量单位"
4848

@@ -354,27 +354,48 @@ msgstr "盎司"
354354
msgid "stone"
355355
msgstr "石头"
356356

357-
#: plugin/units.py:168 plugin/units.py:169
358-
msgid "ton"
359-
msgstr "吨"
357+
#: plugin/units.py:168
358+
msgid "tonne"
359+
msgstr "公吨"
360+
361+
#: plugin/units.py:169
362+
msgid "tonnes"
363+
msgstr "公吨"
364+
365+
#: plugin/units.py:175
366+
msgid "US ton"
367+
msgstr "美吨"
360368

361369
#: plugin/units.py:176
370+
msgid "US tons"
371+
msgstr "美吨"
372+
373+
#: plugin/units.py:182
374+
msgid "Imperial ton"
375+
msgstr "英制吨"
376+
377+
#: plugin/units.py:183
378+
msgid "Imperial tons"
379+
msgstr "英制吨"
380+
381+
#: plugin/units.py:190
362382
msgid "Celsius"
363383
msgstr "摄氏"
364384

365-
#: plugin/units.py:178
385+
#: plugin/units.py:192
366386
msgid "Farenheit"
367387
msgstr "华氏度"
368388

369-
#: plugin/units.py:179
389+
#: plugin/units.py:193
370390
msgid "Kelvin"
371391
msgstr "开尔文"
372392

373-
#: plugin/utils.py:84
393+
#: plugin/utils.py:82
374394
msgid "To and from unit is the same"
375395
msgstr "源单元和目标单元相同"
376396

377-
#: plugin/utils.py:112
397+
#: plugin/utils.py:110
378398
msgid "Problem converting {} and {}"
379399
msgstr "转换问题 {} 和 {}"
380400

401+

plugin/units.py

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,12 +163,26 @@
163163
["lb", _("pound"), _("pounds"), "x / 0.002205", "x * 0.002205"],
164164
["oz", _("ounce"), _("ounces"), "x / 0.035274", " 0.035274"],
165165
["st", _("stone"), _("stone"), "x / 0.000157473", "x * 0.000157473"],
166+
[
167+
"t",
168+
_("tonne"),
169+
_("tonnes"),
170+
"x / 0.000001",
171+
"x * 0.000001",
172+
],
166173
[
167174
"ton",
168-
_("ton"),
169-
_("ton"),
170-
"x / 0.000001102310999995",
171-
"x * 0.000001102310999995",
175+
_("US ton"),
176+
_("US tons"),
177+
"x / 0.0000011023109950010196",
178+
"x * 0.0000011023109950010196",
179+
],
180+
[
181+
"tonimp",
182+
_("Imperial ton"),
183+
_("Imperial tons"),
184+
"x / 0.00000098421",
185+
"x * 0.00000098421",
172186
],
173187
],
174188
"Temperature": [

0 commit comments

Comments
 (0)