aboutsummaryrefslogtreecommitdiff
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add diacritic and spaces to mk{s,d}temp paths to enforce that everything ↵EuAndreh2022-01-201-1/+1
| | | | works with it
* src/git-permalink.in: Add ShellCheck allow-list markersEuAndreh2022-01-181-0/+2
|
* src/locale/: Add translated messagesEuAndreh2022-01-1515-32/+32
|
* Translate and ship strings in src/locale/*.txtEuAndreh2022-01-1526-149/+95
|
* Replace git.euandreh.xyz/xxx with euandreh.xyz/xxx.gitEuAndreh2021-10-111-1/+1
|
* po/extract-strings.sh: Use dedicated file for extracting stringsEuAndreh2021-10-035-16/+15
|
* tests/cli-opts.sh: Recover test_langs()EuAndreh2021-10-021-1/+1
|
* Use po4a for translating src/locale/en.shEuAndreh2021-10-025-94/+151
|
* Makefile: Generate src/locale/en.sh for translationEuAndreh2021-10-021-0/+31
|
* src/git-permalink.in: Add "End of translatable strings" markerEuAndreh2021-09-291-1/+5
|
* src/locale/: Ignore ShellCheck warningsEuAndreh2021-09-204-0/+5
|
* Adapt installation to new i18n.EuAndreh2021-09-201-136/+88
| | | | | Use the locale files over the locale variables. Adapt the "install" and "uninstall" targets to it, and remove the locale test.
* Rework how translation is doneEuAndreh2021-09-144-0/+93
| | | | | Instead of variables on the code itself, each language gets its own file.
* src/git-permalink.in: Use ^ beginning of line marker when grepping for ↵EuAndreh2021-09-141-1/+1
| | | | LC_MESSAGEES
* src/git-permalink.in: Add directions to manpage at the end of help textEuAndreh2021-08-191-4/+12
|
* Remove extra \\ after | in line breaksEuAndreh2021-07-271-4/+4
| | | | Implements #task-1f103822-c865-254c-f6b6-4968f2fb473e.
* src/, tests/: Stick to 80 columns with 8-chars wide tabsEuAndreh2021-07-261-14/+30
|
* src/git-permalink.in: Return 2 on unrecognized CLI optionEuAndreh2021-06-271-0/+2
|
* src/git-permalink.in: Fix ShellCheck offense, remove disableEuAndreh2021-06-271-2/+1
|
* mv src/git-permalink.sh.in src/git-permalin.inEuAndreh2021-06-251-0/+0
| | | | | Mostly to avoid the conflict of the ".sh" built-in rule in the Makefile.
* src/git-permalink.sh.in, tests/remotes.sh: Address ShellCheck issuesEuAndreh2021-06-221-1/+1
|
* src/git-permalink.sh.in: Fix #task-bebbe847-f552-be4b-b886-70a621162b69EuAndreh2021-06-221-14/+14
| | | | | | | | | | | | | 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.
* src/git-permalink.sh.in: Remove empty lines across translated string variablesEuAndreh2021-06-221-2/+0
|
* mv src/git-permalink.sh src/git-permalink.sh.inEuAndreh2021-06-221-0/+0
|
* src/git-permalink.sh: Use getopts, handle "--" somewhatEuAndreh2021-06-221-13/+32
| | | | See #task-bebbe847-f552-be4b-b886-70a621162b69.
* src/git-permalink.sh: Suppress warnings when running "locale"EuAndreh2021-06-211-1/+1
|
* src/git-permalink.sh: Use LC_MESSAGES to decide on the languageEuAndreh2021-06-211-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
* Add support for the Linux kernel CGit instanceEuAndreh2021-06-191-0/+7
|
* Add support for bitbucket.orgEuAndreh2021-06-191-0/+8
|
* Add support for pagure.ioEuAndreh2021-06-191-0/+7
| | | | | | | | | | | | | I only added support for HTTPS remotes, because I'm not willing to go out of my way for creating a Fedora account just to see what an SSH URL looks like. I guess just the prefix would change, but repositories not named "A/B.git" but just "B.git" would need more (trivial) treatment, which I'm not willing to do. It shall stay this way until a contribution comes to improve it, or Pagure stops making it hard for me to implement this.
* Add support for codeberg.orgEuAndreh2021-06-191-0/+8
|
* Add support for notabug.orgEuAndreh2021-06-191-21/+31
|
* Leverage po4a to translate manpagesEuAndreh2021-06-191-2/+2
|
* src/git-permalink.sh: Translate program output to pt, fr and eoEuAndreh2021-06-171-13/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The choice of implementation was very basic: Use strings in the script itself rather than relying on external tools. Compared to a compiled C program using, say, gettext.3, an sh script could also depend on it, but at runtime. An equivalent C code would require the gettext.3 dependency, but at compile time. After compilation, the code required for doing the translation is already on the binary, while an sh script would need gettext.1 to run gettext.1 commands while it executes, such as "gettext -s 'MSG_ABC'". Bash has a very appealing feature: using $"" does a lookup and translates the string. In other words, $"" runs gettext for you, without the script requiring gettext.1, just Bash. As tempting as it was, I chose not to rely on Bash. I preferred the cost of an ad-hoc solution over requiring Bash over POSIX sh. The final solution is simple enough for the git-permalink.1 program, but wouldn't scale for bigger scripts. Strings are placed together for translation, and no external tool is used for this. Due to the way that strings are now given to printf.1, ShellCheck complains a lot about those strings, alonside saying that the string translation variables are unused. They actually are used, but hidden behind an eval. Overall I'm satisfied with the solution, but I probably won't follow the same path for the manpages, and will choose something like po4a for it, instead.
* Show -h and -V flags on usage textEuAndreh2021-06-161-1/+1
|
* src/git-permalink.sh: Fix bad treatment of -p flagEuAndreh2021-06-121-14/+15
|
* src/git-permalink.sh: Fix ShellCheck errorsEuAndreh2021-06-121-1/+4
|
* TODOs.md: Support URL overrides via "git config git-permalink"EuAndreh2021-06-121-22/+31
|
* src/git-permalink.sh: Add -p, -V|--version and -h|--help flagsEuAndreh2021-06-121-5/+43
|
* src/git-permalink.sh: First working versionEuAndreh2021-06-121-7/+76
|
* mv scripts/git-permalink.in src/git-permalink.shEuAndreh2021-06-121-0/+18