Commit message (Collapse) | Author | Files | Lines | ||
---|---|---|---|---|---|
2021-06-23 | aux/workflow/manpages.sh: Refactor how manpages and translations are made | EuAndreh | 4 | -55/+109 | |
I didn't like the previous version of aux/workflow/manpages.sh mainly for 2 reasons: 1. its CLI was terrible, ugly and fragile; 2. it mixed handling manpages and handling *translations*. The first step was to split the translations part to a different file: aux/workflow/l10n.sh. Now it has the base logic for running po4a, and can apply it to manpages. It is useful for updating translated files in other scenarios, such as catgets() message catalogs, markdown files, etc. After I used the venerable getopts to handle the command line arguments, and give aux/workflow/manpages.sh a saner interface. I disliked the fact that aux/workflow/manpages.sh still is being used for the "install" and "uninstall" targets. Before this file, the canonical workflow of "make && make install/uninstall" was 100% embedded within the Makefile itself. But now the Makefile calls to an external script for that. This isn't a real cost, other than how obvious the behaviour is for someone looking at the Makefile for the first time. I still chose to do it anyway, because there was already too many things in the Makefile itself, and it was getting worse with time. I made sure to never cross the line of relying on an external tool for the canonical "make && make install/uninstall", and even for "make check". Those all work without requiring any extra tool outside what POSIX defines, such as "sed", "awk", etc. Despite the cost of adding this detour from the liner Makefile flow, I found it to be worth it to call to the external script, as this script can now also be shared across projects, and the customized Makefile be made simpler. In other to remove the "-- $(do_subst)" horrendous hack, I chose to use an inference rule for ".in" files, and remove the "$(do_subst)" variable altogether. Now all the files that need to go through sed should end in ".in", and the Makefile will take care of producing it. The upside is that this model is much better integrater into make itself. Addresses #task-9ee2bbc8-295f-52b7-4104-483869bad017. | |||||
2021-06-23 | git mv doc/*.po po/ | EuAndreh | 5 | -4/+4 | |
2021-06-23 | aux/workflow/public.sh: Spell out .{svg,png} files (ShellCheck offense) | EuAndreh | 1 | -1/+1 | |
2021-06-23 | TODOs.md: Mark #task-f09dedb7-1b25-0b5e-2520-910a9aa32562 as DONE | EuAndreh | 1 | -1/+5 | |
2021-06-23 | aux/: Explicitly pass "public/" as a parameter to scripts | EuAndreh | 6 | -19/+21 | |
2021-06-23 | aux/workflow/assert-readme.sh: No need to create the public/ directory | EuAndreh | 1 | -2/+0 | |
2021-06-23 | git grep -l PACKAGE aux/ | xargs sed -i 's/PACKAGE/PROJECT/g' | EuAndreh | 3 | -9/+9 | |
2021-06-23 | aux/guix/with-container.sh: Remove -x sh option | EuAndreh | 1 | -1/+1 | |
2021-06-23 | aux/workflow/public.sh: Selectively copy favicon files | EuAndreh | 1 | -1/+1 | |
2021-06-22 | TODOs.md: Add #task-f09dedb7-1b25-0b5e-2520-910a9aa32562 | EuAndreh | 1 | -0/+3 | |
2021-06-22 | doc/: s/SYNOPSYS/SYNOPSIS/ | EuAndreh | 4 | -10/+10 | |
2021-06-22 | TODOs.md: Mark #task-9ee2bbc8-295f-52b7-4104-483869bad017 as TODO again | EuAndreh | 1 | -1/+5 | |
2021-06-22 | tests/remotes.sh: Supress output of git config | EuAndreh | 1 | -2/+2 | |
2021-06-22 | tests/cli-opts.sh: Stop testing behaviour of "locale" command | EuAndreh | 1 | -9/+0 | |
2021-06-22 | tests/remotes.sh: Conditionally set user.{email,name} to work on new env like CI | EuAndreh | 1 | -1/+11 | |
2021-06-22 | aux/tests-lib.sh: Add uuid() function, use it on tests | EuAndreh | 3 | -3/+11 | |
2021-06-22 | src/git-permalink.sh.in, tests/remotes.sh: Address ShellCheck issues | EuAndreh | 2 | -12/+12 | |
2021-06-22 | CHANGELOG.md: Mention integration tests | EuAndreh | 1 | -0/+4 | |
2021-06-22 | TODOs.md: Mark #task-bebbe847-f552-be4b-b886-70a621162b69 as DONE | EuAndreh | 1 | -1/+5 | |
2021-06-22 | src/git-permalink.sh.in: Fix #task-bebbe847-f552-be4b-b886-70a621162b69 | EuAndreh | 2 | -18/+16 | |
The issue wan't with getopts but with my usage of it (well, now that's obvious that the problem wouldn't be in the implementation, but on how I was using). The problem was on: 1) my confusion on when and where to "shift"; 2) make sure to look for the "--help" and "--version" long flags before getopts, because it doesn't know about long flags. Those fixed, the tests are now working again. | |||||
2021-06-22 | TODOs.md: Mark #task-ada9b39a-cc42-97b2-bd02-ad9c0adc475c as DONE | EuAndreh | 1 | -1/+5 | |
2021-06-22 | tests/remotes.sh: Add | EuAndreh | 3 | -0/+179 | |
2021-06-22 | TODOs.md: Mark #task-755d8aa8-d39e-f8ce-d4c8-a8649338fffc as DONE | EuAndreh | 1 | -1/+5 | |
2021-06-22 | tests/install-uninstall.sh: Add | EuAndreh | 2 | -0/+50 | |
2021-06-22 | src/git-permalink.sh.in: Remove empty lines across translated string variables | EuAndreh | 1 | -2/+0 | |
2021-06-22 | TODOs.md: Add #task-755d8aa8-d39e-f8ce-d4c8-a8649338fffc | EuAndreh | 1 | -0/+3 | |
2021-06-22 | tests/cli-opts.sh: Use portable "sh git-permalink" over "./git-permalink" | EuAndreh | 1 | -15/+15 | |
2021-06-22 | mv src/git-permalink.sh src/git-permalink.sh.in | EuAndreh | 2 | -1/+1 | |
2021-06-22 | CHANGELOG.md: Mention "getopts" | EuAndreh | 1 | -0/+11 | |
2021-06-22 | TODOs.md: Mark #task-ada9b39a-cc42-97b2-bd02-ad9c0adc475c as DONE | EuAndreh | 1 | -1/+5 | |
2021-06-22 | Add small example of using -- on manpage | EuAndreh | 8 | -62/+137 | |
2021-06-22 | TODOs.md: Mark #task-cded56f2-c939-3c69-c818-0fb62d62cfd8 as DONE | EuAndreh | 1 | -1/+5 | |
2021-06-22 | aux/tests-lib.sh: Use colours on test output | EuAndreh | 1 | -6/+17 | |
2021-06-22 | tests/cli-opts.sh: Add test_langs | EuAndreh | 1 | -0/+70 | |
2021-06-22 | TODOs.md: spellchecking | EuAndreh | 1 | -4/+4 | |
2021-06-22 | TODOs.md: Mark #task-9ee2bbc8-295f-52b7-4104-483869bad017 as DONE | EuAndreh | 1 | -1/+5 | |
2021-06-22 | TODOs.md: Add #task-cded56f2-c939-3c69-c818-0fb62d62cfd8 | EuAndreh | 1 | -0/+3 | |
2021-06-22 | src/git-permalink.sh: Use getopts, handle "--" somewhat | EuAndreh | 1 | -13/+32 | |
See #task-bebbe847-f552-be4b-b886-70a621162b69. | |||||
2021-06-22 | TODOs.md: Add #task-bebbe847-f552-be4b-b886-70a621162b69 | EuAndreh | 1 | -0/+26 | |
2021-06-22 | aux/workflow/TODOs.sh: Use <pre> over <span> for visible ids | EuAndreh | 1 | -1/+1 | |
2021-06-22 | README.md: Better wording on the installation explanation | EuAndreh | 1 | -6/+8 | |
2021-06-22 | TODOs.md: Add #task-ada9b39a-cc42-97b2-bd02-ad9c0adc475c | EuAndreh | 1 | -0/+3 | |
2021-06-22 | TODOs.md: Add #task-ab5a4835-3d79-03e4-8342-7f5add40b159 | EuAndreh | 1 | -0/+3 | |
2021-06-21 | src/git-permalink.sh: Suppress warnings when running "locale" | EuAndreh | 1 | -1/+1 | |
2021-06-21 | aux/guix/manifest.scm: Add glibc for the "locale" command | EuAndreh | 1 | -1/+2 | |
2021-06-21 | TODOs.md: Add #decision-1f7db3d5-002e-515e-f209-0d0917228359 | EuAndreh | 1 | -0/+19 | |
2021-06-21 | src/git-permalink.sh: Use LC_MESSAGES to decide on the language | EuAndreh | 1 | -4/+13 | |
First, instead of looking at "${LANG:-}" for choosing the language, we now use LC_MESSAGES from the locale(1) command. LC_MESSAGES is the appropriate place to look at, and it inherits the value of $LANG by default, but can be overriden so that the text messages from a program spits out strings from a language, but use everything else from $LANG (such as LC_NUMERIC), like in: LANG=abc LC_MESSAGES=zzz I took this opportunity to look only at the language and country part of the locale, and not at the codeset or modifier (as in ll_CC.CODESET@modifier), so that as long as the language+country is the same, it uses the according message. This addresses the "Maybe it could be less restrictive of country or encoding" comment on | |||||
2021-06-21 | TODOs.md: Mark #task-717fa8b7-1c92-5766-8872-280ae061bf4b as CANCELLED | EuAndreh | 1 | -1/+25 | |
2021-06-21 | TODOs.md: Mark https://nullprogram.com/blog/2020/08/01/ as CANCELLED | EuAndreh | 1 | -1/+8 | |
2021-06-21 | TODOs.md: Add #task-717fa8b7-1c92-5766-8872-280ae061bf4b | EuAndreh | 1 | -0/+3 | |