summaryrefslogtreecommitdiff
path: root/tmac/e.tmac
diff options
context:
space:
mode:
authorG. Branden Robinson <g.branden.robinson@gmail.com>2021-12-27 18:16:26 +1100
committerG. Branden Robinson <g.branden.robinson@gmail.com>2021-12-27 19:27:30 +1100
commitfc4363b5d722a37ae540cb89b9aa434d7a5e46a0 (patch)
tree631dfc72e4f55902f6a6c0d628208b3640b461eb /tmac/e.tmac
parent67e944be21be3cf5ab6f7ad0b4c1c255505a3301 (diff)
downloadgroff-git-fc4363b5d722a37ae540cb89b9aa434d7a5e46a0.tar.gz
[me]: Internationalize strings.
* tmac/e.tmac (initialization): Introduce internal `_mo1`..`_mo12`, `_dw1`..`_dw7`, and `_td_format` strings (with English defaults). Define them outside of the new `ld` macro so that they can be overriden by localization packages. (ld) <dw, mo, td>: Populate via the above new strings. * tmac/trans.tmac: Stop defining `mo` and `dw`. Instead, make them aliases of the new strings above. Handle `wa` and `wc` similarly. This commit provokes a warning when the `meintro_fr.me` is processed: warning: macro 'french-appendix_string' not defined (It causes no changes to the rendered output because chapter and appendix headings are not used, nor is the `td` string.) This will be fixed in the next commit.
Diffstat (limited to 'tmac/e.tmac')
-rw-r--r--tmac/e.tmac47
1 files changed, 24 insertions, 23 deletions
diff --git a/tmac/e.tmac b/tmac/e.tmac
index 94ac8bf89..1221fccb5 100644
--- a/tmac/e.tmac
+++ b/tmac/e.tmac
@@ -1945,37 +1945,38 @@
..
.
.\" *** DATE AND LOCALIZATION ***
-.
-.de ld \" *** (re-)initialize date and localization
.ds wa Appendix\"
.ds wc Chapter\"
+.do ds _mo1 January\"
+.do ds _mo2 February\"
+.do ds _mo3 March\"
+.do ds _mo4 April\"
+.do ds _mo5 May\"
+.do ds _mo6 June\"
+.do ds _mo7 July\"
+.do ds _mo8 August\"
+.do ds _mo9 September\"
+.do ds _mo10 October\"
+.do ds _mo11 November\"
+.do ds _mo12 December\"
+.do ds _dw1 Sunday\"
+.do ds _dw2 Monday\"
+.do ds _dw3 Tuesday\"
+.do ds _dw4 Wednesday\"
+.do ds _dw5 Thursday\"
+.do ds _dw6 Friday\"
+.do ds _dw7 Saturday\"
+.do ds _td_format \\*(mo \\n(dy, \\n(y4\"
.
+.de ld \" *** (re-)initialize date and localization
.\" Work around troff `yr` register's y2k problem.
.nr y2 \\n(yr%100
.af y2 00
.nr y4 \\n(yr+1900
.
-.if \\n(mo=1 .ds mo January\"
-.if \\n(mo=2 .ds mo February\"
-.if \\n(mo=3 .ds mo March\"
-.if \\n(mo=4 .ds mo April\"
-.if \\n(mo=5 .ds mo May\"
-.if \\n(mo=6 .ds mo June\"
-.if \\n(mo=7 .ds mo July\"
-.if \\n(mo=8 .ds mo August\"
-.if \\n(mo=9 .ds mo September\"
-.if \\n(mo=10 .ds mo October\"
-.if \\n(mo=11 .ds mo November\"
-.if \\n(mo=12 .ds mo December\"
-.if \\n(dw=1 .ds dw Sunday\"
-.if \\n(dw=2 .ds dw Monday\"
-.if \\n(dw=3 .ds dw Tuesday\"
-.if \\n(dw=4 .ds dw Wednesday\"
-.if \\n(dw=5 .ds dw Thursday\"
-.if \\n(dw=6 .ds dw Friday\"
-.if \\n(dw=7 .ds dw Saturday\"
-.
-.ds td \\*(mo \\n(dy, \\n(y4\"
+.do ds dw \\*[_dw\\n(dw]
+.do ds mo \\*[_mo\\n(mo]
+.do ds td \\*[_td_format]
..
.
.ld