1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-11-04 08:17:17 -05:00
Commit Graph

159 Commits

Author SHA1 Message Date
Kalle Olavi Niemitalo
595261c601 Fixed all accelerator conflicts.
This includes conflicts between msgstr and msgid.
The accelerators are probably not optimal now, but at least they are unique.
2006-02-19 02:17:19 +02:00
Kalle Olavi Niemitalo
96cc86bc64 v1.4 supports a new option: --msgid-fallback. 2006-02-19 02:11:52 +02:00
Jonas Fonseca
8e1b6011bb po: mention one known false-positive reported by check-po 2006-02-19 00:17:05 +01:00
Jonas Fonseca
3436d63507 da.po: fix all errors and hotkey conflicts reported by check-po 2006-02-19 00:13:08 +01:00
Jonas Fonseca
274e32f6d5 Update po files to have accellerator checking tags 2006-02-19 00:05:26 +01:00
Laurent MONIN
d0e0bff4dc French translation was updated. 2006-02-18 22:47:28 +01:00
Kalle Olavi Niemitalo
3251644dcf Locale::PO now preserves unrecognized flags, although there is still
no documented way to access them.  It also preserves the order of
flags, if no flags are modified.
  Replaced the fuzzy, c_format, and php_format fields with _flaghash,
and renamed the _flag field to _flagstr.
  Flag-setting functions silently map unsupported values (e.g. 42) to
supported ones (e.g. 1), which they also return.
  The c_format and php_format methods treat empty strings as undef,
rather than as 0.
  Names of flags are case-sensitive, like in GNU Gettext.

POD changes:
  Unlisted the bugs that have now been fixed.
2006-02-18 20:30:40 +02:00
Kalle Olavi Niemitalo
2431fe4711 Made it possible to scan msgid strings for accelerator conflicts, too.
But disabled that for now.
2006-02-18 12:21:18 +02:00
Kalle Olavi Niemitalo
de564b7b4b Updated the Almost Bugs section to match recent changes. 2006-02-12 21:48:43 +02:00
Kalle Olavi Niemitalo
21643e8a51 v1.3 proposes accelerators that are still available. 2006-02-12 21:08:23 +02:00
Kalle Olavi Niemitalo
272fbb9785 v1.2 tries not to report the same conflict multiple times.
It also recognizes conflicts that involve more than two msgstrs.
And it no longer outputs the msgids.
These changes make the output much shorter than before,
while still listing all the relevant information.
2006-02-12 20:28:07 +02:00
Kalle Olavi Niemitalo
90f06379da check-accelerator-conflicts.pl displays line numbers saved by Locale::PO. 2006-02-12 19:25:27 +02:00
Kalle Olavi Niemitalo
aed3c674af save_file returns undef and remembers $! if print fails.
POD changes:
Revised the synopses of the methods, paying attention to levels of quoting.
Repeat the synopsis above the description of each method.
Never write C<Locale::PO>; it looks bad in pod2text.
2006-02-12 17:16:35 +02:00
Kalle Olavi Niemitalo
f4015a985c New parser in Locale::PO supports obsolete entries and fixes other bugs.
Removed the corresponding workaround from check-accelerator-conflicts.pl.
2006-02-12 00:33:11 +02:00
Kalle Olavi Niemitalo
0066214b47 Merge with http://elinks.cz/elinks.git 2006-02-10 09:15:12 +02:00
Laurent MONIN
e7eaa56315 French translation was updated. 2006-02-07 08:28:53 +01:00
Kalle Olavi Niemitalo
970c7f5483 Documented the load_file and save_file methods of Locale::PO. 2006-02-05 19:16:06 +02:00
Kalle Olavi Niemitalo
15d4531f14 Renamed normalize_str to _normalize_str, and dump_multi_comment to _dump_multi_comment. 2006-02-05 18:21:25 +02:00
Kalle Olavi Niemitalo
b1f8756c59 Merge with http://elinks.cz/elinks.git 2006-02-05 17:48:43 +02:00
Kalle Olavi Niemitalo
608727861d Minor fix and comments in Locale::PO:
The load_file function binds $/ and $_ dynamically.
Added comments about the fields of Locale::PO objects.
2006-02-05 17:47:36 +02:00
Laurent MONIN
1a394f7f28 French translation was updated. 2006-01-30 23:29:11 +01:00
ef11f9750e Translation update 2006-01-30 09:09:26 +01:00
207922b371 Translation update 2006-01-30 08:33:59 +01:00
cb6a63f09e Translation fixes 2006-01-28 22:06:10 +01:00
Laurent MONIN
3cb9af2f41 French translation was updated. 2006-01-17 00:04:10 +01:00
Jonas Fonseca
2748d043f9 Autogenerate .vimrc files and put the master in config/vimrc
This changes the init target to be idempotent: most importantly it will now
never overwrite a Makefile if it exists. Additionally 'make init' will
generate the .vimrc files. Yay, no more stupid 'added fairies' commits! ;)
2006-01-15 18:38:58 +01:00
Kalle Olavi Niemitalo
89fe822f70 Merge with 6a9ea02f3a
(via http://elinks.cz/elinks.git)
2006-01-14 21:30:12 +02:00
Kalle Olavi Niemitalo
f5131c1132 Accelerator checker framework version 1.1.
Both gather-accelerator-contexts.pl and check-accelerator-conflicts.pl
now sport an --accelerator-tag option, fixing a BUGS item.
2006-01-14 19:36:58 +02:00
Kalle Olavi Niemitalo
6f44394dfa Renamed check-accelerator-contexts.pl to check-accelerator-conflicts.pl. 2006-01-14 16:50:45 +02:00
Kalle Olavi Niemitalo
71bf9716c8 gather-accelerator-contexts.pl parses options, and the top_srcdir must
now be specified as --srcdir=top_srcdir (or --source-directory=top_srcdir
or -S top_srcdir).  Changed po/Makefile to match.
This option can even be repeated; that resolves a BUGS item.
Changed po/Makefile to ignore exit codes from check-accelerator-contexts.pl.
Enabled bundling of options in Getopt::Long so that -Stop_srcdir works too.
2006-01-14 12:24:32 +02:00
Kalle Olavi Niemitalo
78ea4c8425 Pass a hash to pod2usage. That's the recommended way. 2006-01-13 23:36:18 +02:00
Kalle Olavi Niemitalo
c8c4d087bf check-accelerator-contexts.pl has --help, --version, and exit codes.
It can also check multiple files listed on the command line.
2006-01-13 23:33:52 +02:00
Adam Golebiowski
8c182b4ca3 Polish translation was updated (work mostly done by Jakub Bogusz) 2006-01-11 00:41:37 +01:00
Adam Golebiowski
f15c0a2677 Merge with git+ssh://pasky.or.cz/srv/git/elinks.git 2006-01-11 00:29:10 +01:00
Laurent MONIN
6966d15d67 French translation was updated. 2006-01-10 23:03:38 +01:00
Kalle Olavi Niemitalo
e4c8367186 Documented po/perl/*.pl and rewrote po/perl/README.
The detailed documentation is now as POD in the scripts, and the README
just gives an overview and describes how the scripts relate to ELinks.
The intention here is to make the scripts more readily usable for programs
other than ELinks.  The scripts now describe their licensing, too.
2006-01-09 02:17:16 +02:00
Kalle Olavi Niemitalo
c29ec0d691 Documented the lack of charset handling in Locale::PO. 2006-01-08 14:39:18 +02:00
Kalle Olavi Niemitalo
2232e80db3 Greatly expanded the BUGS section of Locale::PO. 2006-01-08 14:25:04 +02:00
Kalle Olavi Niemitalo
da7d4cfa25 Documented Locale::PO::php_format. 2006-01-07 19:45:54 +02:00
Kalle Olavi Niemitalo
4e653e8c84 Use fields, and "my Locale::PO" where applicable. 2006-01-06 17:56:08 +02:00
Kalle Olavi Niemitalo
35d9107406 Documented some quirks of Locale::PO.
- Documented quoting in the msgid, msgid_plural, msgstr, and msgstr_n methods.
- Documented newlines in the comment, automatic, and reference methods.
2006-01-06 03:26:26 +02:00
Kalle Olavi Niemitalo
d3b0178d88 Forked Locale/PO.pm. No real code changes yet. 2006-01-06 03:02:06 +02:00
Kalle Olavi Niemitalo
93714a3e35 Merge with http://elinks.cz/elinks.git 2006-01-06 02:13:11 +02:00
Laurent MONIN
08928b3606 Fix update-po target which failed to notice a change in source tree. 2006-01-03 14:04:25 +01:00
Laurent MONIN
0cdc748331 French translation was updated. 2006-01-03 13:44:15 +01:00
Jonas Fonseca
5a031a7c74 Fix test of $(srcdir) to have sane exit code when it is empty 2006-01-02 00:28:23 +01:00
Kalle Olavi Niemitalo
eb99af7a33 Merge with http://elinks.cz/elinks.git 2006-01-02 01:27:11 +02:00
9a24f86a99 Merge with git+ssh://pasky.or.cz/srv/git/elinks.git 2006-01-02 00:07:44 +01:00
Kalle Olavi Niemitalo
a035b22426 Added the missing semicolon for the check-po rule.
It is needed there even in the last command, because it's in a foreach loop.
2006-01-02 00:00:40 +02:00
Jonas Fonseca
322e28ff0c Merge with git+ssh://pasky/srv/git/elinks.git 2006-01-01 22:55:13 +01:00
Kalle Olavi Niemitalo
08efa818aa Merge with http://elinks.cz/elinks.git 2006-01-01 23:55:02 +02:00
Jonas Fonseca
9c50072c97 Fix more problems when $(srcdir) is empty
Thanks to Kalle Olavi Niemitalo and Adam Golebiowski.
2006-01-01 22:54:44 +01:00
69e2ceb1d0 Polish translation was updated. 2006-01-01 22:54:20 +01:00
Kalle Olavi Niemitalo
dd9b321d15 Moved Perl scripts to a "perl" directory and imported Locale::PO. 2006-01-01 23:32:42 +02:00
Kalle Olavi Niemitalo
451f23d272 Doh, make the Perl scripts executable. 2006-01-01 19:30:29 +02:00
Kalle Olavi Niemitalo
345ba7afcd Merge with http://elinks.cz/elinks.git 2006-01-01 19:05:44 +02:00
Kalle Olavi Niemitalo
4c2831677a Here is a framework that detects cases where a PO file assigns
the same accelerator key to multiple buttons in a dialog box or
to multiple items in a menu.  ELinks already has some support for
this but it requires the translator to run ELinks and manually
scan through all menus and dialogs.  The attached changes make it
possible to quickly detect and list any conflicts, including ones
that can only occur on operating systems or configurations that
the translator is not currently using.

The changes have no immediate effect on the elinks executable or
the MO files.  PO files become larger, however.

The scheme works like this:

- Like before, accelerator keys in translatable strings are
  tagged with the tilde (~) character.

- Whenever a C source file defines an accelerator key, it must
  assign one or more named "contexts" to it.  The translations in
  the PO files inherit these contexts.  If multiple strings use
  the same accelerator (case insensitive) in the same context,
  that's a conflict and can be detected automatically.

- The contexts are defined with "gettext_accelerator_context"
  comments in source files.  These comments delimit regions where
  all translatable strings containing tildes are given the same
  contexts.  There must be one special comment at the top of the
  region; it lists the contexts assigned to that region.  The
  region automatically ends at the end of the function (found
  with regexp /^\}/), but it can also be closed explicitly with
  another special comment.  The comments are formatted like this:

    /* [gettext_accelerator_context(foo, bar, baz)]
         begins a region that uses the contexts "foo", "bar", and "baz".
         The comma is the delimiter; whitespace is optional.

       [gettext_accelerator_context()]
         ends the region.  */

  The scripts don't currently check whether this syntax occurs
  inside or outside comments.

- The names of contexts consist of C identifiers delimited with
  periods.  I typically used the name of a function that sets
  up a dialog, or the name of an array where the items of a
  menu are listed.  There is a special feature for static
  functions: if the name begins with a period, then the period
  will be replaced with the name of the source file and a colon.

- If a menu is programmatically generated from multiple parts,
  of which some are never used together, so that it is safe to
  use the same accelerators in them, then it is necessary to
  define multiple contexts for the same menu.  link_menu() in
  src/viewer/text/link.c is the most complex example of this.

- During make update-po:

  - A Perl script (po/gather-accelerator-contexts.pl) reads
    po/elinks.pot, scans the source files listed in it for
    "gettext_accelerator_context" comments, and rewrites
    po/elinks.pot with "accelerator_context" comments that
    indicate the contexts of each msgid: the union of all
    contexts of all of its uses in the source files.  It also
    removes any "gettext_accelerator_context" comments that
    xgettext --add-comments has copied to elinks.pot.

  - If po/gather-accelerator-contexts.pl does not find any
    contexts for some use of an msgid that seems to contain an
    accelerator (because it contains a tilde), it warns.  If the
    tilde refers to e.g. "~/.elinks" and does not actually mark
    an accelerator, the warning can be silenced by specifying the
    special context "IGNORE", which the script otherwise ignores.

  - msgmerge copies the "accelerator_context" comments from
    po/elinks.pot to po/*.po.  Translators do not edit those
    comments.

- During make check-po:

  - Another Perl script (po/check-accelerator-contexts.pl) reads
    po/*.po and keeps track of which accelerators have been bound
    in each context.  It warns about any conflicts it finds.
    This script does not access the C source files; thus it does
    not matter if the line numbers in "#:" lines are out of date.

This implementation is not perfect and I am not proposing to
add it to the main source tree at this time.  Specifically:

- It introduces compile-time dependencies on Perl and Locale::PO.
  There should be a configure-time or compile-time check so that
  the new features are skipped if the prerequisites are missing.

- When the scripts include msgstr strings in warnings, they
  should transcode them from the charset of the PO file to the
  one specified by the user's locale.

- It is not adequately documented (well, except perhaps here).

- po/check-accelerator-contexts.pl reports the same conflict
  multiple times if it occurs in multiple contexts.

- The warning messages should include line numbers, so that users
  of Emacs could conveniently edit the conflicting part of the PO
  file.  This is not feasible with the current version of
  Locale::PO.

- Locale::PO does not understand #~ lines and spews warnings
  about them.  There is an ugly hack to hide these warnings.

- Jonas Fonseca suggested the script could propose accelerators
  that are still available.  This has not been implemented.

There are three files attached:

- po/gather-accelerator-contexts.pl: Augments elinks.pot with
  context information.

- po/check-accelerator-contexts.pl: Checks conflicts.

- accelerator-contexts.diff: Makes po/Makefile run the scripts,
  and adds special comments to source files.
2006-01-01 18:55:18 +02:00
Laurent MONIN
c3cb0ba44e French translation was updated. 2006-01-01 17:53:34 +01:00
Jonas Fonseca
bb463d17f2 Fix po/Makefile w.r.t. the new value of $(srcdir) when srcdir == buildir 2006-01-01 17:34:12 +01:00
Miciah Dashiel Butler Masters
59ffb72b8f Drop .or from elinks.or.cz. 2005-12-29 04:35:02 +00:00
Jonas Fonseca
2fab08497e Ignore potfiles.list 2005-12-27 01:35:15 +01:00
Jonas Fonseca
b9c5bc5536 Make building of .gmo files use the new build system
It now shows:
	[GMSGFMT]   po/da.gmo      1538 translated messages, ...
2005-12-26 19:17:47 +01:00
Laurent MONIN
4af4ac8a59 French translation was updated. 2005-12-26 10:26:11 +01:00
Laurent MONIN
7b6afb52c8 Change date in fr.po. 2005-12-19 08:28:08 +01:00
Laurent MONIN
4c21b95815 French translation was updated. 2005-12-18 20:52:43 +01:00
Russ Rowan
42f715f90f Clean up 'make clean'. 2005-12-15 04:04:26 -05:00
Laurent MONIN
22f3f394f9 French translation was updated. 2005-12-13 17:26:02 +01:00
Kalle Olavi Niemitalo
ce852b9d5f Use $@ to simplify a rule and try to nullify metacharacters
I changed the %.gmo rule in po/Makefile to use $@ instead of a shell
variable, and made various tweaks in it to better support strange file
names, e.g. spaces in $(srcdir).  I suppose other makefiles in ELinks and
other rules in po/Makefile do not support those, but one must start
somewhere.  I don't think it will ever be feasible to support backslashes
and quotes without horrible contortions, but spaces and dashes should be
doable.

I also quoted the ~ in --check-accelerators=~ in case some shell might want
to expand it as the home directory. Bash 3.00.16(1) doesn't because the
word contains dashes.
2005-12-10 17:07:21 +01:00
Kalle Olavi Niemitalo
f25f944123 Fix update-po and check-po when srcdir != builddir
Now, $(lang).po files are always read and written in srcdir.
Also, document how *.gmo files end up in both srcdir and builddir.
2005-12-10 17:03:41 +01:00
Laurent MONIN
2b266945cc French translation was updated. 2005-12-06 22:04:23 +01:00
Jonas Fonseca
c546fdb1f7 Sync with current source tree 2005-12-06 13:49:55 +01:00
Kalle Olavi Niemitalo
b1a48b6b4f Remove SUFFIXES variable and .SUFFIXES rule
According to the documentation, GNU Make uses them only for suffix rules,
which have been replaced with pattern rules in po/Makefile. The makefiles
included by po/Makefile do not define suffix rules, either.
2005-12-06 12:23:19 +01:00
Kalle Olavi Niemitalo
0c1819b5d4 Update Finnish translation
This is by no means perfect, but it's better than the current version.
2005-12-04 20:26:11 +01:00
Jonas Fonseca
53f756719a Remove dist rule
We don't use 'make dist' anymore. Reported by Kalle Olavi Niemitalo.
2005-12-04 20:12:52 +01:00
28a8626072 resolved some fuzzies and killed few missing translations 2005-11-27 21:18:32 +01:00
Laurent MONIN
810eb30d78 French translation was updated. 2005-11-27 19:23:10 +01:00
Jonas Fonseca
ce70c52557 Update Danish translation 2005-11-27 07:28:49 +01:00
Laurent MONIN
0cc6877365 French translation was updated. 2005-10-30 17:26:15 +01:00
Jonas Fonseca
212c0e6c04 Drop install-local-{yes,no} rules since logic was moved to the top Makefile 2005-10-30 08:07:03 +01:00
Laurent MONIN
df065ead80 Remove now useless $Id: lines. 2005-10-21 09:14:07 +02:00
Jonas Fonseca
c88afeb1c2 path_to_top -> top_builddir 2005-10-20 04:00:35 +02:00
Jonas Fonseca
db99a74777 Add support for out-of-tree builds
Involves prefixing with $(srcdir) to some of the build rule variables. For
the builddir we create Makefiles which simply include the srcdir Makefile.
Add list make rule to get list of Makefiles to generate (find will get it
wrong for builddirs nested in srcdir).

There are still a few minor issues like the file paths echoed during make
install ...
2005-10-20 03:49:40 +02:00
Jonas Fonseca
a617d5b140 Convert to new suffix rule and make install-local depend on all-local 2005-10-20 03:33:35 +02:00
Jonas Fonseca
e39a4342d6 Include $(top_srcdir)/Makefile.lib instead of $(path_to_top)/Makefile.lib
A step towards out of tree builds ...
2005-10-20 01:11:47 +02:00
Laurent MONIN
73150589c4 Store the list of files to pass to xgettext through -f files in file named
'potfiles.list'.
2005-10-19 11:09:41 +02:00
Laurent MONIN
8fd7b64dff Support for make install PO=<lang>. 2005-10-18 12:16:12 +02:00
Laurent MONIN
dd3702ca5f Use $(lang) instead of less explicit $(C). 2005-10-18 12:14:38 +02:00
Laurent MONIN
0407633145 Simplify update-po target. 2005-10-18 12:11:55 +02:00
Laurent MONIN
246e321848 Clean up and simplify check-po rule. 2005-10-18 11:52:29 +02:00
Laurent MONIN
ffceacbd7d Fix po files installation with make 3.79.1, related code was simplified. 2005-10-18 11:18:05 +02:00
Jonas Fonseca
c6f6717a79 Re-commit the rest of the changes which was reverted in the recent 'funny merge' 2005-10-17 23:20:53 +02:00
Jonas Fonseca
fe7879c248 Rename clean target to clean-local 2005-10-02 20:32:31 +02:00
Jonas Fonseca
daaf61331a Make installation also use the cmd calling
Makes it more obvious which files are actually installed. MKINSTALLDIRS
still spurs out a lot of 'mkdir ...', which probably should also be
silenced when V=0.
2005-10-01 14:16:19 +02:00
Jonas Fonseca
b30064c0d0 Rename targets: *-l -> *-local 2005-09-27 21:11:28 +02:00
Petr Baudis
d8bc3f7b15 Merge with /srv/git/elinks.git 2005-09-26 16:09:29 +02:00
Petr Baudis
87938bbeca Rename locale no to nb
Apparently new name for the locale, makes new gettexts happy. Pointed
out by darix and probably someone else too.
2005-09-26 16:09:00 +02:00
Jonas Fonseca
c2879b655b Merge with git+ssh://pasky.or.cz/srv/git/elinks.git 2005-09-23 14:51:51 +02:00
Strahinya Radich
f86a009108 Add Serbian translation 2005-09-23 14:51:14 +02:00
Petr Baudis
bd0f5ba60d We call $(mkinstalldirs) $(MKINSTALLDIRS)
Should fix make install.
2005-09-23 09:08:47 +02:00
Jonas Fonseca
2ce808cb0f Revert building of po/ with out running configure 2005-09-18 21:34:13 +02:00