1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00
Commit Graph

95 Commits

Author SHA1 Message Date
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