aboutsummaryrefslogtreecommitdiff
path: root/TODOs.md
diff options
context:
space:
mode:
Diffstat (limited to 'TODOs.md')
-rw-r--r--TODOs.md26
1 files changed, 25 insertions, 1 deletions
diff --git a/TODOs.md b/TODOs.md
index cd7cf15..9b2c76a 100644
--- a/TODOs.md
+++ b/TODOs.md
@@ -1,6 +1,30 @@
# Tasks
-## TODO Use `gettext` for translating `src/git-permalink.sh` texts {#task-717fa8b7-1c92-5766-8872-280ae061bf4b}
+## CANCELLED Use `gettext` for translating `src/git-permalink.sh` texts {#task-717fa8b7-1c92-5766-8872-280ae061bf4b}
+- CANCELLED in 2021-06-21
+
+ I've considered this, and I even started working on it, but I've chosen not to pursue it further, as I now think this is a mistake.
+
+ Regardless of gettext's power and usefulness, it is definitvely an overkill for for this application.
+ It would bring more things to the project, both in build time (requiring the generation of message files and friends) but also in run time (loading the message files themselves).
+ This could certainly be done via `$PREFIX/libexec/$lang.sh` or something equivalent, but this would also be increasing the installation complexity, too.
+ Expecting a sane installation environment is sane (but not always true), but the reasoning behind doing is just "because".
+
+ The same functionality can be implemented with less, and it already is.
+
+ It may be true that for bigger programs the same trade-off reasoning would tip the balance to the other side, and make choosing gettext a *better* decision, but this is not the case.
+
+ For the modest purpose of this software, the current solution is good enough.
+ Maybe it could be less restrictive of country or encoding, but the fundamental idea of embedded variables with an `eval` to define the relevant one stays the same.
+ Changing from an `eval` to a `case` statement builds upon the same underlying principle: of having string variables on the same file, and keep them in sync in a completly manual process.
+
+ Consider the cost and complexity of building tooling around the [quotation of the `don't` text][quotation], and one can envision one of the challenges that including in specialized i18n tooling might bring along.
+ Those tools have their usages and places, they do exist for a good reason, and they should be used when applicable, but this is not it.
+
+ This isn't really about POSIX sh, implementation language, or even the size of the program, but about the trade-off analysis of this use case, where I'm the one writing the code and the translations on a tiny piece of POSIX sh code.
+ This analysis makes me choose **not** to use `gettext`.
+
+ [quotation]: https://git.euandreh.xyz/git-permalink/tree/src/git-permalink.sh?id=caaac9ffb8c80432ef41ad9434762d3e3401f01a#n11
- TODO in 2021-06-21
## DONE Make `OVERRIDES` and `SUPPORTED REMOTES` a subsection of `CONFIGURATION` {#task-9be7e4f5-df3c-ed5f-1ca1-2ce9fc61d944}