1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

NLS: Put list of available languages into LINGUAS files

This moves the list of available languages from nls.mk into a separate
file called po/LINGUAS.  Advantages:

- It keeps the parts notionally managed by programmers (nls.mk)
  separate from the parts notionally managed by translators (LINGUAS).

- It's the standard practice recommended by the Gettext manual
  nowadays.

- The Meson build system also supports this layout (and of course
  doesn't know anything about our custom nls.mk), so this would enable
  sharing the list of languages between the two build systems.

(The MSVC build system currently finds all po files by globbing, so it
is not affected by this change.)

Reviewed-by: Andres Freund <andres@anarazel.de>
Discussion: https://www.postgresql.org/message-id/flat/557a9f5c-e871-edc7-2f58-a4140fb65b7b@enterprisedb.com
This commit is contained in:
Peter Eisentraut
2022-07-13 07:51:43 +02:00
parent f29199d319
commit 88dad06b47
54 changed files with 41 additions and 40 deletions

View File

@ -175,10 +175,11 @@ make init-po
Copy this file to
<filename><replaceable>language</replaceable>.po</filename> and
edit it. To make it known that the new language is available,
also edit the file <filename>nls.mk</filename> and add the
language (or language and country) code to the line that looks like:
also edit the file <filename>po/LINGUAS</filename> and add the
language (or language and country) code next to languages already listed,
like:
<programlisting>
AVAIL_LANGUAGES := de fr
de fr
</programlisting>
(Other languages can appear, of course.)
</para>
@ -375,16 +376,6 @@ fprintf(stderr, gettext("panic level %d\n"), lvl);
</listitem>
</varlistentry>
<varlistentry>
<term><varname>AVAIL_LANGUAGES</varname></term>
<listitem>
<para>
List of provided translations &mdash; initially empty.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>GETTEXT_FILES</varname></term>
@ -424,6 +415,12 @@ fprintf(stderr, gettext("panic level %d\n"), lvl);
</para>
</step>
<step>
<para>
Add a file <filename>po/LINGUAS</filename>, which will contain the list
of provided translations &mdash; initially empty.
</para>
</step>
</procedure>
<para>