| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
works with it
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Use the locale files over the locale variables. Adapt the "install" and
"uninstall" targets to it, and remove the locale test.
|
|
|
|
|
| |
Instead of variables on the code itself, each language gets its own
file.
|
|
|
|
| |
LC_MESSAGEES
|
| |
|
|
|
|
| |
Implements #task-1f103822-c865-254c-f6b6-4968f2fb473e.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Mostly to avoid the conflict of the ".sh" built-in rule in the
Makefile.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
| |
See #task-bebbe847-f552-be4b-b886-70a621162b69.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|