From 34b2e18587c374c8beba95ce2e22215ab50f409e Mon Sep 17 00:00:00 2001 From: ZiRo Date: Sun, 28 Feb 2016 08:54:05 +0100 Subject: [PATCH 1/7] Add dummy translation files --- .gitignore | 3 ++- contrib/translations/en-US.ini | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 contrib/translations/en-US.ini diff --git a/.gitignore b/.gitignore index a482ca1..ecee1b5 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,8 @@ .\#* # srnd config files -*.ini +srnd.ini +feeds.ini # default article store directory articles diff --git a/contrib/translations/en-US.ini b/contrib/translations/en-US.ini new file mode 100644 index 0000000..04eabf0 --- /dev/null +++ b/contrib/translations/en-US.ini @@ -0,0 +1,5 @@ +[formats] +long_date_format=Mon Jan _2 15:04:05 2006 + +[strings] +foo=bar From 2ea928417daae749a3c8568df77e6dfa772dd2b7 Mon Sep 17 00:00:00 2001 From: ZiRo Date: Sun, 28 Feb 2016 09:48:07 +0100 Subject: [PATCH 2/7] Localize time formats --- contrib/translations/en-US.ini | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/contrib/translations/en-US.ini b/contrib/translations/en-US.ini index 04eabf0..11b038d 100644 --- a/contrib/translations/en-US.ini +++ b/contrib/translations/en-US.ini @@ -1,5 +1,7 @@ [formats] -long_date_format=Mon Jan _2 15:04:05 2006 +full_date_format=Mon Jan _2 15:04:05 2006 +month_date_format=2006-02 +day_date_format=01-02 [strings] foo=bar From 9974628f62d1906e2f9f0a6cc95e799b39130c6e Mon Sep 17 00:00:00 2001 From: ZiRo Date: Sun, 28 Feb 2016 10:19:55 +0100 Subject: [PATCH 3/7] Make it possible to add more parameters to post template --- contrib/templates/default/post.mustache | 38 ++++++++++++------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/contrib/templates/default/post.mustache b/contrib/templates/default/post.mustache index 1799255..e1ad1bd 100644 --- a/contrib/templates/default/post.mustache +++ b/contrib/templates/default/post.mustache @@ -1,31 +1,31 @@ -
+
- {{#IsI2P}} - - {{/IsI2P}} - {{#IsTor}} - - {{/IsTor}} - {{#IsClearnet}} - - {{/IsClearnet}} + {{#post.IsI2P}} + + {{/post.IsI2P}} + {{#post.IsTor}} + + {{/post.IsTor}} + {{#post.IsClearnet}} + + {{/post.IsClearnet}} - {{Subject}} - {{Name}} - - No.{{ShortHash}} - [Reply] - {{{Pubkey}}} + {{post.Subject}} + {{post.Name}} + + No.{{post.ShortHash}} + [Reply] + {{{post.Pubkey}}} - {{#Attachments}} + {{#post.Attachments}}
{{Filename}}
- {{/Attachments}} + {{/post.Attachments}}
- {{{RenderBody}}} + {{{post.RenderBody}}}
From 1c4f4630c25f2c90ad7bbe87f3ce9dc8778b4aef Mon Sep 17 00:00:00 2001 From: ZiRo Date: Sun, 28 Feb 2016 13:40:16 +0100 Subject: [PATCH 4/7] localize templates --- contrib/templates/default/board.mustache | 6 +- contrib/templates/default/boardlist.mustache | 10 +- contrib/templates/default/catalog.mustache | 6 +- contrib/templates/default/frontpage.mustache | 8 +- .../templates/default/graph_history.mustache | 6 +- contrib/templates/default/keygen.mustache | 6 +- contrib/templates/default/modlogin.mustache | 6 +- .../default/modlogin_result.mustache | 4 +- contrib/templates/default/modpage.mustache | 56 ++++----- contrib/templates/default/navbar.mustache | 8 +- contrib/templates/default/newboard.mustache | 12 +- contrib/templates/default/overview.mustache | 6 +- contrib/templates/default/post.mustache | 8 +- contrib/templates/default/post_fail.mustache | 4 +- contrib/templates/default/post_retry.mustache | 6 +- .../templates/default/post_success.mustache | 4 +- contrib/templates/default/postform.mustache | 14 +-- .../templates/default/posts_graph.mustache | 4 +- contrib/templates/default/thread.mustache | 2 +- contrib/templates/default/ukko.mustache | 6 +- contrib/translations/en-US.ini | 112 +++++++++++++++++- 21 files changed, 202 insertions(+), 92 deletions(-) diff --git a/contrib/templates/default/board.mustache b/contrib/templates/default/board.mustache index 01dd049..99ced97 100644 --- a/contrib/templates/default/board.mustache +++ b/contrib/templates/default/board.mustache @@ -29,7 +29,7 @@
{{board.Board}}
- +
{{{form}}} @@ -38,7 +38,7 @@
{{#board.Threads}}
-
+
{{{OP.Truncate.RenderPost}}} {{#Truncate.Replies}} @@ -52,7 +52,7 @@ | - Catalog + {{#i18n.Translations}}{{catalog_label}}{{/i18n.Translations}}
- Catalog for {{board.Name}} + {{#i18n.Translations}}{{catalog_title}}{{/i18n.Translations}} {{board.Name}} @@ -15,14 +15,14 @@
-
Catalog for {{board.Name}}
+
{{#i18n.Translations}}{{catalog_title}}{{/i18n.Translations}} {{board.Name}}

{{#board.Threads}}
-
R: {{ReplyCount}} / P: {{Page}}
+
{{#i18n.Translations}}{{replies_short_label}}{{/i18n.Translations}}: {{ReplyCount}} / {{#i18n.Translations}}{{pictures_short_label}}{{/i18n.Translations}}: {{Page}}
{{OP.Subject}}
{{{OP.RenderBody}}} diff --git a/contrib/templates/default/frontpage.mustache b/contrib/templates/default/frontpage.mustache index b7c4f85..1dc29a3 100644 --- a/contrib/templates/default/frontpage.mustache +++ b/contrib/templates/default/frontpage.mustache @@ -43,10 +43,10 @@ - - - - + + + + diff --git a/contrib/templates/default/graph_history.mustache b/contrib/templates/default/graph_history.mustache index 1860f9b..7ab8396 100644 --- a/contrib/templates/default/graph_history.mustache +++ b/contrib/templates/default/graph_history.mustache @@ -9,15 +9,15 @@ template parameters: - Post History + {{#i18n.Translations}}{{post_history_title}}{{/i18n.Translations}}
Board Posts this Hour Posts Today Total {{#i18n.Translations}}{{board_label}}{{/i18n.Translations}} {{#i18n.Translations}}{{posts_hour}}{{/i18n.Translations}} {{#i18n.Translations}}{{posts_today}}{{/i18n.Translations}} {{#i18n.Translations}}{{total}}{{/i18n.Translations}}
- - + + diff --git a/contrib/templates/default/keygen.mustache b/contrib/templates/default/keygen.mustache index b176b96..d7fb725 100644 --- a/contrib/templates/default/keygen.mustache +++ b/contrib/templates/default/keygen.mustache @@ -11,11 +11,11 @@ - here is a new tripcode + {{#i18n.Translations}}{{new_tripcode_title}}{{/i18n.Translations}} -
New Tripcode:
-      
secret: {{secret}}
public: {{public}}
tripcode: {{{tripcode}}}
+
{{#i18n.Translations}}{{new_tripcode_label}}{{/i18n.Translations}}:
+      
{{#i18n.Translations}}{{secret_key}}{{/i18n.Translations}}: {{secret}}
{{#i18n.Translations}}{{public_key}}{{/i18n.Translations}}: {{public}}
{{#i18n.Translations}}{{tripcode}}{{/i18n.Translations}}: {{{tripcode}}}
diff --git a/contrib/templates/default/modlogin.mustache b/contrib/templates/default/modlogin.mustache index 5f9643c..8f4cb2f 100644 --- a/contrib/templates/default/modlogin.mustache +++ b/contrib/templates/default/modlogin.mustache @@ -2,13 +2,13 @@ - login + {{#i18n.Translations}}{{login}}{{/i18n.Translations}}
- + - + {{{csrfField}}} diff --git a/contrib/templates/default/modlogin_result.mustache b/contrib/templates/default/modlogin_result.mustache index 55cbaa2..80d6851 100644 --- a/contrib/templates/default/modlogin_result.mustache +++ b/contrib/templates/default/modlogin_result.mustache @@ -11,9 +11,9 @@ - login + {{#i18n.Translations}}{{login}}{{/i18n.Translations}}

{{message}}

- \ No newline at end of file + diff --git a/contrib/templates/default/modpage.mustache b/contrib/templates/default/modpage.mustache index b727431..d762c47 100644 --- a/contrib/templates/default/modpage.mustache +++ b/contrib/templates/default/modpage.mustache @@ -10,93 +10,93 @@ - nntpchan mod page + {{#i18n.Translations}}{{modpage_title}}{{/i18n.Translations}}
-
post actions
+
{{#i18n.Translations}}{{post_actions_label}}{{/i18n.Translations}}

- +
- - - + + +

-
key actions
+
{{#i18n.Translations}}{{key_actions_label}}{{/i18n.Translations}}
- +
- - + +

-
nntp login
+
{{#i18n.Translations}}{{nntp_login_label}}{{/i18n.Translations}}
- +
- +
- +
- +

-
board actions
+
{{#i18n.Translations}}{{board_actions_label}}{{/i18n.Translations}}
- +
- +
- +
- - + +
- +

- lightweight actions + {{#i18n.Translations}}{{light_actions_label}}{{/i18n.Translations}}
- +

- +
- - + +
diff --git a/contrib/templates/default/navbar.mustache b/contrib/templates/default/navbar.mustache index f3c7e39..d07876b 100644 --- a/contrib/templates/default/navbar.mustache +++ b/contrib/templates/default/navbar.mustache @@ -12,7 +12,7 @@ -
\ No newline at end of file +
diff --git a/contrib/templates/default/newboard.mustache b/contrib/templates/default/newboard.mustache index c6315db..1889605 100644 --- a/contrib/templates/default/newboard.mustache +++ b/contrib/templates/default/newboard.mustache @@ -1,13 +1,13 @@ - create new board + {{#i18n.Translations}}{{new_board_title}}{{/i18n.Translations}} -

make your first post

+

{{#i18n.Translations}}{{first_post_label}}{{/i18n.Translations}}


@@ -16,7 +16,7 @@
MonthPosts{{#i18n.Translations}}{{month}}{{/i18n.Translations}}{{#i18n.Translations}}{{posts}}{{/i18n.Translations}}
- Board Name + {{#i18n.Translations}}{{board_name_title}}{{/i18n.Translations}} @@ -25,7 +25,7 @@
- Comment + {{#i18n.Translations}}{{comment}}{{/i18n.Translations}} @@ -33,7 +33,7 @@
- Captcha + {{#i18n.Translations}}{{captcha}}{{/i18n.Translations}} captcha @@ -41,7 +41,7 @@
- Solution + {{#i18n.Translations}}{{solution}}{{/i18n.Translations}} diff --git a/contrib/templates/default/overview.mustache b/contrib/templates/default/overview.mustache index 01a2f97..ee434ed 100644 --- a/contrib/templates/default/overview.mustache +++ b/contrib/templates/default/overview.mustache @@ -8,9 +8,9 @@ paramters: - - - + + + diff --git a/contrib/templates/default/post.mustache b/contrib/templates/default/post.mustache index e1ad1bd..c23e851 100644 --- a/contrib/templates/default/post.mustache +++ b/contrib/templates/default/post.mustache @@ -2,20 +2,20 @@ {{#post.IsI2P}} - + {{/post.IsI2P}} {{#post.IsTor}} - + {{/post.IsTor}} {{#post.IsClearnet}} - + {{/post.IsClearnet}} {{post.Subject}} {{post.Name}} No.{{post.ShortHash}} - [Reply] + [{{#i18n.Translations}}{{reply_label}}{{/i18n.Translations}}] {{{post.Pubkey}}} {{#post.Attachments}} diff --git a/contrib/templates/default/post_fail.mustache b/contrib/templates/default/post_fail.mustache index 1c5ee50..8d0bcf3 100644 --- a/contrib/templates/default/post_fail.mustache +++ b/contrib/templates/default/post_fail.mustache @@ -4,6 +4,6 @@ -

post failed: {{reason}}

+

{{#i18n.Translations}}{{post_failed_label}}{{/i18n.Translations}}: {{reason}}

- \ No newline at end of file + diff --git a/contrib/templates/default/post_retry.mustache b/contrib/templates/default/post_retry.mustache index 93a79d9..071087e 100644 --- a/contrib/templates/default/post_retry.mustache +++ b/contrib/templates/default/post_retry.mustache @@ -24,7 +24,7 @@
NewsgroupPostedSubject{{#i18n.Translations}}{{newsgroup}}{{/i18n.Translations}}{{#i18n.Translations}}{{posted}}{{/i18n.Translations}}{{#i18n.Translations}}{{subject}}{{/i18n.Translations}}
- Captcha + {{#i18n.Translations}}{{captcha}}{{/i18n.Translations}} captcha @@ -32,7 +32,7 @@
- Solution + {{#i18n.Translations}}{{solution}}{{/i18n.Translations}} @@ -45,4 +45,4 @@ - \ No newline at end of file + diff --git a/contrib/templates/default/post_success.mustache b/contrib/templates/default/post_success.mustache index aa3c468..956ab04 100644 --- a/contrib/templates/default/post_success.mustache +++ b/contrib/templates/default/post_success.mustache @@ -10,6 +10,6 @@ -
posted as {{message_id}}
+
{{#i18n.Translations}}{{posted_as_label}}{{/i18n.Translations}} {{message_id}}
- \ No newline at end of file + diff --git a/contrib/templates/default/postform.mustache b/contrib/templates/default/postform.mustache index 6a5370e..6c69f93 100644 --- a/contrib/templates/default/postform.mustache +++ b/contrib/templates/default/postform.mustache @@ -17,7 +17,7 @@
- Name + {{#i18n.Translations}}{{name}}{{/i18n.Translations}} @@ -25,7 +25,7 @@
- Subject + {{#i18n.Translations}}{{subject}}{{/i18n.Translations}} @@ -34,7 +34,7 @@
- Comment + {{#i18n.Translations}}{{comment}}{{/i18n.Translations}} @@ -43,7 +43,7 @@ {{#files}}
- File + {{#i18n.Translations}}{{file}}{{/i18n.Translations}} @@ -52,7 +52,7 @@ {{/files}}
- Get Dubs + {{#i18n.Translations}}{{dubs}}{{/i18n.Translations}} @@ -60,7 +60,7 @@
- Captcha + {{#i18n.Translations}}{{captcha}}{{/i18n.Translations}} captcha @@ -68,7 +68,7 @@
- Solution + {{#i18n.Translations}}{{solution}}{{/i18n.Translations}} diff --git a/contrib/templates/default/posts_graph.mustache b/contrib/templates/default/posts_graph.mustache index 7dfd6a1..96c0262 100644 --- a/contrib/templates/default/posts_graph.mustache +++ b/contrib/templates/default/posts_graph.mustache @@ -8,8 +8,8 @@ parameters: - - + + diff --git a/contrib/templates/default/thread.mustache b/contrib/templates/default/thread.mustache index 8bf06ad..6fbae1d 100644 --- a/contrib/templates/default/thread.mustache +++ b/contrib/templates/default/thread.mustache @@ -44,7 +44,7 @@ {{/ thread.Replies}}
- +
DayPosts{{#i18n.Translations}}{{day}}{{/i18n.Translations}}{{#i18n.Translations}}{{posts}}{{/i18n.Translations}}