| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
following https://github.com/sabotage-linux/gettext-tiny/issues/12
as said in the previous commit, the gnu makefile does not work. So,
here, i delete all actions like updating po files by POT, refresh
files...etc. I kicked all stuff out of Makefile, except building .po
files and installing .mo files. The original file installation logic is
kept, either, for not to damage the eco system of autotools. Issue is
completely solved after these three commits.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
following https://github.com/sabotage-linux/gettext-tiny/issues/12
this for supporting auto generation of po Makefile. Softwares may not
write their own Makefile.in for po/* at all. Instead, they depend on
autotools to generate Makefile. And the template makefile.in.in comes
from autopoint.
But the gnu one does not suite gettext-tiny, since xgettext and msgmerge
both are stubs. So, this commit did not work, and it may cause error,
DO NOT USE! A suitable version is to be added in the next commit.
|
|
|
|
|
|
|
|
|
|
|
|
| |
following https://github.com/sabotage-linux/gettext-tiny/issues/12
this is the first part of the solution the issue, to prepare for
introducing Makefile.in.in in the next commit.
we modify m4dir to datadir, as we will introduce Makefile.in.in, which
should be copied to $datadir$/gettety-tiny. It's a better name. Also
moving m4 to a subdir makes a cleaner structure and a good place to
place Makefile.in.in.
|
|
|
|
|
| |
when compiling tilda, the stub Makefile lacks `install:`, which is
causing errors, this is a quick fix
|
|
|
|
| |
made by rofl0r
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As rofl0r suggested, libintl.a now comes in two flavours, no-op or musl,
or we could just disable it.
no-op: gettext functions just return the input string as translation and
symbols help to get past configure scripts
musl: symbols as in no-op, with libintl built-in in to recent musl
version
Use LIBINTL=FLAVOR, FLAVOR can be NOOP(no-op), MUSL, NONE(disable)
|
|
|
|
|
|
|
| |
found when compiling git/vi.po
writestr() was executed twice due to depend on the wrong flag, this
could be fixed by checking 'i'. 'i' will be 0 for at least and only
one time which is suitable in case.
|
|
|
|
| |
In ki18n/cy-ver, fuzzy appeared just at the first several lines, which is making msgfmt see header as 'the obsolete'.
|
|
|
|
|
| |
Offset caculation is not only complex, but also unreliable. It's hard to say what would happened when it meets an unexpected situation.
Now, writemsg() at the end, so we only need to consider d.len[], quite simpler, faster and safer than before.
|
|
|
|
| |
follow commit https://github.com/sabotage-linux/gettext-tiny/commit/b49e68b34d5fb5ee328bca43d98655ec4c7f25e6, correct the code
|
|
|
|
| |
since i reconstructed the code last time(switch to writemsg()/writelstr()), it wont delete the invalid msgid/str anymore, the original code doesnt make sense. here's the new code, which could work well with writemsg()/writestr().
|
|
|
|
|
|
| |
found when compiling dnsmasq
we can't fseek in stdin, we can only read it for one time
so now i write them to a temporary file first instead
|
|
|
|
|
| |
failed compiling ki18n due to the static size msgstrbuf[8120]
so, we now malloc dynamic buffer, and two asserts make sure safe
|
|
|
|
|
|
|
|
| |
with rtype in compiling of glib, a hidden bug was found
excepted: swith(msgstr, ctxt) == la_proc
reality: swith(msgstr, ctxt) == la_abort
the wrong rule was introduced in https://github.com/sabotage-linux/gettext-tiny/commit/d1bd158eb7463967ab3dd9a862e14d114523d37b
|
|
|
|
| |
follow https://github.com/sabotage-linux/gettext-tiny/commit/7409501c4cdd4c8d89e6898405816c636a129dc7#commitcomment-22212741
|
|
|
|
|
|
|
| |
here the input, msgid foo; #xxx ; msgid foo2
exception: switch(msgid, msgid) == abort
reality: after go through #xxx, it's now switch(invalid, msgid) == la_incr
so one more value, prev_rtype is here to fix the issue
|
| |
|
|
|
|
| |
though num[str] is allowed to be a little smaller than the maxium value, but it's not allowd to be smaller than num[msgid], which is the minimum value
|
|
|
|
| |
do not assign 0 to nplurals, since it's used as a divisor, avoid arithmetical exceptions
|
|
|
|
|
| |
it's pure number now instead of one in ascii, 50 -> 2. i forgot to
change this when i decided to translate nplurals in ascii to pure number.
|
|\
| |
| | |
some improvements to make it a real alternative to gnu msgfmt
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
with plurals allowed <= nplurals, we can not check it accurately(!=).
But it's impossible that str > the excepted maximum
|
| |
| |
| |
| |
| | |
when msgstr is empty, it's invalid. dinvalid() will delete the invalid
or write them down.
|
| | |
|
| | |
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
|
| |
as discussed in bc018ee9d4483df17c45953809715df28f3b934b, configure
scripts check for "GNU" by running `msgfmt --statistics /dev/null`.
in our previous fix we changed --statistics from merely being ignored
to just return 0, however that breaks when it is used together with
other options during normal use, like:
msgfmt -c --statistics --verbose -o de.gmo de.po
as done by GNU coreutils.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the .mo format was designed in a way such that all application
can used a single shared non-mutable copy of the translation strings
in memory.
years later an issue was identified with format string specifier macros
that differ between platforms (like PRIu64) and a new
syntax introduced: %<PRIuMAX>.
this however breaks the non-mutable aspect of the .mo files, since now
every application has to remap a modified copy of the strings containing
these "sysdep" format specifiers.
we simply replace these with all possible expanded values of such a macro
directly in the generated .mo file.
|
|
|
|
|
|
|
| |
closes #6
unfortunately the fail-safe design had to be sacrified, to effectively
sort the string table we need to allocate dynamic memory.
|
|
|
|
|
|
|
|
| |
gnulib git, rev 4084b3a git://git.sv.gnu.org/gnulib.git
gnulib git seems to be original source this stuff comes from.
had to update because the existing m4 files had some incompatibility
with latest gnu autotools when trying to build nano from git.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
po.m4 from gnulib/gettext uses a check that this option is supported
in order to exclude the FreeBSD implementation, and force the GNU version
on them.
http://git.savannah.gnu.org/cgit/gettext.git/tree/gettext-runtime/m4/po.m4?id=d9cfbdfecb502b70c55e594bc897c217ac082f5f#n37
it does so since several years, so it's funny we haven't hit that earlier.
however this now triggers for "deadbeef" in version 0.7.2.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
all autoconf packages that use gnu gettext for translations require
a tool called autopoint in order to run `autoreconf -i`, which is
the command to generate the configure script from configure.ac.
this is often needed to compile git checkouts of applications, because
they usually do not have the configure scripts and the other generated
files checked into their version control systems.
the autopoint tool is called without parameters, and it is required to
copy some m4 files into place and generate some other files.
this version here was created just by observing which error messages
would be thrown after running it and gradually adding functionality.
it was tested on a git checkout of weechat, and later on the source
tarballs of various packages like glib, and it seemed to work so far.
it's very likely that in future new scenarios will show up that require
additional files, but what we have right now is a good start.
the m4 files were taken from gnu gettext 0.18, and they are all licensed
under very liberal conditions. each file has the original copyright header.
there's only one m4 file i wrote myself, which is configheader.m4,
supplying a macro i couldn't otherwise find in gettext's source code.
|
| |
|
|
|
|
|
|
|
| |
if the outputfile is given, but no outputdir specified, we shall not
prefix the outputfilename with `./`.
experienced during the build of weechat 1.6.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit ee82b152ce2b4ab74b7ac72d27540f0dd01172e8.
While this now creates valid translation files, it opened the door
for a lot of nasty cornercases like plural forms that were elegantly
circumvented in the earlier design, but now causing breakage.
such breakage was experienced with de.pot from gnu coreutils.
development of the "full-featured" msgfmt will eventually continue
in the "full" branch and merged into master when it's ready for
prime-time.
|
|
|
|
|
|
|
| |
closes #6
unfortunately the fail-safe design had to be sacrified, to effectively
sort the string table we need to allocate dynamic memory.
|
|
|
|
|
|
|
| |
some configure scripts check for msgmerge by executing
msgmerge --update -q /dev/null /dev/null
i.e. they test the most exotic and useless usage case to make sure
they get *GNU* msgmerge and nothing else.
|
| |
|
| |
|
| |
|