Skip to content

Commit

Permalink
[i18n] move gettext translation template to contrib
Browse files Browse the repository at this point in the history
Signed-off-by: R4SAS <r4sas@i2pmail.org>
  • Loading branch information
r4sas committed Jun 16, 2021
1 parent 6be4d50 commit 2ba3f47
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
8 changes: 4 additions & 4 deletions i18n/English.po → contrib/i18n/English.po
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,23 @@ msgid "Enabled"
msgstr ""

#: daemon/HTTPServer.cpp:141
msgid "days"
msgid "day"
msgid_plural "days"
msgstr[0] ""
msgstr[1] ""
#: daemon/HTTPServer.cpp:145
msgid "hours"
msgid "hour"
msgid_plural "hours"
msgstr[0] ""
msgstr[1] ""
#: daemon/HTTPServer.cpp:149
msgid "minutes"
msgid "minute"
msgid_plural "minutes"
msgstr[0] ""
msgstr[1] ""

#: daemon/HTTPServer.cpp:152
msgid "seconds"
msgid "second"
msgid_plural "seconds"
msgstr[0] ""
msgstr[1] ""
Expand Down
7 changes: 7 additions & 0 deletions contrib/i18n/regex.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Regex for transforming gettext translations to our format

msgid\ \"(.*)\"\nmsgid_plural\ \"(.*)\"\nmsgstr\[0\]\ \"(.*)\"\nmsgstr\[1\]\ \"(.*)\"\n(msgstr\[2\]\ \"(.*)\"\n)?(msgstr\[3\]\ \"(.*)\"\n)?(msgstr\[4\]\ \"(.*)\"\n)?(msgstr\[5\]\ \"(.*)\"\n)?
#{"$2", {"$3", "$4", "$6", "$8", "$10"}},\n

msgid\ \"(.*)\"\nmsgstr\ \"(.*)\"\n
{"$1", "$2"},\n

0 comments on commit 2ba3f47

Please sign in to comment.