NLS: Put list of available languages into LINGUAS files
authorPeter Eisentraut <[email protected]>
Wed, 13 Jul 2022 05:51:43 +0000 (07:51 +0200)
committerPeter Eisentraut <[email protected]>
Wed, 13 Jul 2022 06:19:17 +0000 (08:19 +0200)
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 <[email protected]>
Discussion: https://www.postgresql.org/message-id/flat/557a9f5c-e871-edc7-2f58-a4140fb65b7b@enterprisedb.com

54 files changed:
doc/src/sgml/nls.sgml
src/backend/nls.mk
src/backend/po/LINGUAS [new file with mode: 0644]
src/bin/initdb/nls.mk
src/bin/initdb/po/LINGUAS [new file with mode: 0644]
src/bin/pg_amcheck/nls.mk
src/bin/pg_amcheck/po/LINGUAS [new file with mode: 0644]
src/bin/pg_archivecleanup/nls.mk
src/bin/pg_archivecleanup/po/LINGUAS [new file with mode: 0644]
src/bin/pg_basebackup/nls.mk
src/bin/pg_basebackup/po/LINGUAS [new file with mode: 0644]
src/bin/pg_checksums/nls.mk
src/bin/pg_checksums/po/LINGUAS [new file with mode: 0644]
src/bin/pg_config/nls.mk
src/bin/pg_config/po/LINGUAS [new file with mode: 0644]
src/bin/pg_controldata/nls.mk
src/bin/pg_controldata/po/LINGUAS [new file with mode: 0644]
src/bin/pg_ctl/nls.mk
src/bin/pg_ctl/po/LINGUAS [new file with mode: 0644]
src/bin/pg_dump/nls.mk
src/bin/pg_dump/po/LINGUAS [new file with mode: 0644]
src/bin/pg_resetwal/nls.mk
src/bin/pg_resetwal/po/LINGUAS [new file with mode: 0644]
src/bin/pg_rewind/nls.mk
src/bin/pg_rewind/po/LINGUAS [new file with mode: 0644]
src/bin/pg_test_fsync/nls.mk
src/bin/pg_test_fsync/po/LINGUAS [new file with mode: 0644]
src/bin/pg_test_timing/nls.mk
src/bin/pg_test_timing/po/LINGUAS [new file with mode: 0644]
src/bin/pg_upgrade/nls.mk
src/bin/pg_upgrade/po/LINGUAS [new file with mode: 0644]
src/bin/pg_verifybackup/nls.mk
src/bin/pg_verifybackup/po/LINGUAS [new file with mode: 0644]
src/bin/pg_waldump/nls.mk
src/bin/pg_waldump/po/LINGUAS [new file with mode: 0644]
src/bin/psql/nls.mk
src/bin/psql/po/LINGUAS [new file with mode: 0644]
src/bin/scripts/nls.mk
src/bin/scripts/po/LINGUAS [new file with mode: 0644]
src/interfaces/ecpg/ecpglib/nls.mk
src/interfaces/ecpg/ecpglib/po/LINGUAS [new file with mode: 0644]
src/interfaces/ecpg/preproc/nls.mk
src/interfaces/ecpg/preproc/po/LINGUAS [new file with mode: 0644]
src/interfaces/libpq/nls.mk
src/interfaces/libpq/po/LINGUAS [new file with mode: 0644]
src/nls-global.mk
src/pl/plperl/nls.mk
src/pl/plperl/po/LINGUAS [new file with mode: 0644]
src/pl/plpgsql/src/nls.mk
src/pl/plpgsql/src/po/LINGUAS [new file with mode: 0644]
src/pl/plpython/nls.mk
src/pl/plpython/po/LINGUAS [new file with mode: 0644]
src/pl/tcl/nls.mk
src/pl/tcl/po/LINGUAS [new file with mode: 0644]

index d49f44f3f23bf4982ca7ef082cef93fb57019745..4b683458f9c89f34a7764317aed34d1d96e3e4b9 100644 (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>
index 355299804f3918fb53ef3233b79aa133705ac188..c31339be31757b561220756b83c8985bb4ced225 100644 (file)
@@ -1,6 +1,5 @@
 # src/backend/nls.mk
 CATALOG_NAME     = postgres
-AVAIL_LANGUAGES  = de es fr id it ja ko pl pt_BR ru sv tr uk zh_CN
 GETTEXT_FILES    = + gettext-files
 GETTEXT_TRIGGERS = $(BACKEND_COMMON_GETTEXT_TRIGGERS) \
     GUC_check_errmsg \
diff --git a/src/backend/po/LINGUAS b/src/backend/po/LINGUAS
new file mode 100644 (file)
index 0000000..a27ddd5
--- /dev/null
@@ -0,0 +1 @@
+de es fr id it ja ko pl pt_BR ru sv tr uk zh_CN
index fe7bdfc04a5f0dcf79aba253742a6119bae1a67e..19c91368493ed0873449e092a2cdefd551b9a538 100644 (file)
@@ -1,6 +1,5 @@
 # src/bin/initdb/nls.mk
 CATALOG_NAME     = initdb
-AVAIL_LANGUAGES  = cs de el es fr he it ja ko pl pt_BR ru sv tr uk vi zh_CN
 GETTEXT_FILES    = $(FRONTEND_COMMON_GETTEXT_FILES) findtimezone.c initdb.c ../../common/exec.c ../../common/fe_memutils.c ../../common/file_utils.c ../../common/pgfnames.c ../../common/restricted_token.c ../../common/rmtree.c ../../common/username.c ../../common/wait_error.c ../../port/dirmod.c
 GETTEXT_TRIGGERS = $(FRONTEND_COMMON_GETTEXT_TRIGGERS) simple_prompt
 GETTEXT_FLAGS    = $(FRONTEND_COMMON_GETTEXT_FLAGS)
diff --git a/src/bin/initdb/po/LINGUAS b/src/bin/initdb/po/LINGUAS
new file mode 100644 (file)
index 0000000..3a24184
--- /dev/null
@@ -0,0 +1 @@
+cs de el es fr he it ja ko pl pt_BR ru sv tr uk vi zh_CN
index 0813fe1cec09974467a773c72b6201da2da44fcd..5e6171952c0f756b432c5c97ed1175a8bfd40021 100644 (file)
@@ -1,6 +1,5 @@
 # src/bin/pg_amcheck/nls.mk
 CATALOG_NAME     = pg_amcheck
-AVAIL_LANGUAGES  = de el es fr ja ru sv uk zh_CN
 GETTEXT_FILES    = $(FRONTEND_COMMON_GETTEXT_FILES) \
                    pg_amcheck.c \
                    ../../fe_utils/cancel.c \
diff --git a/src/bin/pg_amcheck/po/LINGUAS b/src/bin/pg_amcheck/po/LINGUAS
new file mode 100644 (file)
index 0000000..7595b76
--- /dev/null
@@ -0,0 +1 @@
+de el es fr ja ru sv uk zh_CN
index 51a6767d8d946d71e2d65459c1cd10f5074b3e0b..801cf1c51e8426cf8685f7db8ffb6f29e03d466a 100644 (file)
@@ -1,6 +1,5 @@
 # src/bin/pg_archivecleanup/nls.mk
 CATALOG_NAME     = pg_archivecleanup
-AVAIL_LANGUAGES  = cs de el es fr ja ko pl ru sv tr uk vi zh_CN
 GETTEXT_FILES    = $(FRONTEND_COMMON_GETTEXT_FILES) pg_archivecleanup.c
 GETTEXT_TRIGGERS = $(FRONTEND_COMMON_GETTEXT_TRIGGERS)
 GETTEXT_FLAGS    = $(FRONTEND_COMMON_GETTEXT_FLAGS)
diff --git a/src/bin/pg_archivecleanup/po/LINGUAS b/src/bin/pg_archivecleanup/po/LINGUAS
new file mode 100644 (file)
index 0000000..f0979ea
--- /dev/null
@@ -0,0 +1 @@
+cs de el es fr ja ko pl ru sv tr uk vi zh_CN
index ec7393d321190f7c72fd2d89b92161fab17caf23..8d28e249dedfb2c723655f38ccb60eb74651a94f 100644 (file)
@@ -1,6 +1,5 @@
 # src/bin/pg_basebackup/nls.mk
 CATALOG_NAME     = pg_basebackup
-AVAIL_LANGUAGES  = cs de es fr he it ja ko pl pt_BR ru sv tr uk vi zh_CN
 GETTEXT_FILES    = $(FRONTEND_COMMON_GETTEXT_FILES) \
                    bbstreamer_file.c \
                    bbstreamer_gzip.c \
diff --git a/src/bin/pg_basebackup/po/LINGUAS b/src/bin/pg_basebackup/po/LINGUAS
new file mode 100644 (file)
index 0000000..9852f70
--- /dev/null
@@ -0,0 +1 @@
+cs de es fr he it ja ko pl pt_BR ru sv tr uk vi zh_CN
index 5d8fd7e7cc3cf2678bb1cc222e59ae81c7032edf..f7cd2a5ee937116545dabd0c582a34647e9ef26c 100644 (file)
@@ -1,6 +1,5 @@
 # src/bin/pg_checksums/nls.mk
 CATALOG_NAME     = pg_checksums
-AVAIL_LANGUAGES  = cs de el es fr ja ko ru sv tr uk zh_CN
 GETTEXT_FILES    = $(FRONTEND_COMMON_GETTEXT_FILES) \
                    pg_checksums.c \
                    ../../fe_utils/option_utils.c
diff --git a/src/bin/pg_checksums/po/LINGUAS b/src/bin/pg_checksums/po/LINGUAS
new file mode 100644 (file)
index 0000000..78db9ae
--- /dev/null
@@ -0,0 +1 @@
+cs de el es fr ja ko ru sv tr uk zh_CN
index 77680fa23c0c2debab1e5cab4d669cf20c3ecd62..d86c28c404d682e74fd707cc83b43507b1673f65 100644 (file)
@@ -1,4 +1,3 @@
 # src/bin/pg_config/nls.mk
 CATALOG_NAME     = pg_config
-AVAIL_LANGUAGES  = cs de el es fr he it ja ko nb pl pt_BR ro ru sv ta tr uk vi zh_CN zh_TW
 GETTEXT_FILES    = pg_config.c ../../common/config_info.c ../../common/exec.c
diff --git a/src/bin/pg_config/po/LINGUAS b/src/bin/pg_config/po/LINGUAS
new file mode 100644 (file)
index 0000000..8736ee6
--- /dev/null
@@ -0,0 +1 @@
+cs de el es fr he it ja ko nb pl pt_BR ro ru sv ta tr uk vi zh_CN zh_TW
index 5c0e33e91a1d644944395667fc19841079cf79c7..ab34205b960105a111700ab5282aef490f1a57fa 100644 (file)
@@ -1,6 +1,5 @@
 # src/bin/pg_controldata/nls.mk
 CATALOG_NAME     = pg_controldata
-AVAIL_LANGUAGES  = cs de el es fr it ja ko pl pt_BR ru sv tr uk vi zh_CN
 GETTEXT_FILES    = pg_controldata.c ../../common/controldata_utils.c
 GETTEXT_TRIGGERS = $(FRONTEND_COMMON_GETTEXT_TRIGGERS)
 GETTEXT_FLAGS    = $(FRONTEND_COMMON_GETTEXT_FLAGS)
diff --git a/src/bin/pg_controldata/po/LINGUAS b/src/bin/pg_controldata/po/LINGUAS
new file mode 100644 (file)
index 0000000..a13bb1a
--- /dev/null
@@ -0,0 +1 @@
+cs de el es fr it ja ko pl pt_BR ru sv tr uk vi zh_CN
index 15b5b4851a20f7a4d6db843c188124f3c8fdbbac..84e7fb4e56084f2ba77658679b5d400864032c68 100644 (file)
@@ -1,4 +1,3 @@
 # src/bin/pg_ctl/nls.mk
 CATALOG_NAME     = pg_ctl
-AVAIL_LANGUAGES  = cs de el es fr he it ja ko pl pt_BR ru sv tr uk zh_CN
 GETTEXT_FILES    = pg_ctl.c ../../common/exec.c ../../common/fe_memutils.c ../../common/wait_error.c ../../port/path.c
diff --git a/src/bin/pg_ctl/po/LINGUAS b/src/bin/pg_ctl/po/LINGUAS
new file mode 100644 (file)
index 0000000..508771c
--- /dev/null
@@ -0,0 +1 @@
+cs de el es fr he it ja ko pl pt_BR ru sv tr uk zh_CN
index dc7360db48725b4a9fecd46480dc1dce8b51c7ac..3054f93fadf9f32cd5aa7a21a95b85b0a6c2b1a6 100644 (file)
@@ -1,6 +1,5 @@
 # src/bin/pg_dump/nls.mk
 CATALOG_NAME     = pg_dump
-AVAIL_LANGUAGES  = cs de el es fr he it ja ko pl pt_BR ru sv tr uk zh_CN
 GETTEXT_FILES    = $(FRONTEND_COMMON_GETTEXT_FILES) \
                    pg_backup_archiver.c pg_backup_db.c pg_backup_custom.c \
                    pg_backup_null.c pg_backup_tar.c \
diff --git a/src/bin/pg_dump/po/LINGUAS b/src/bin/pg_dump/po/LINGUAS
new file mode 100644 (file)
index 0000000..508771c
--- /dev/null
@@ -0,0 +1 @@
+cs de el es fr he it ja ko pl pt_BR ru sv tr uk zh_CN
index 6b85a78828c4550b3c69ffe3eb78dfe24e7c1dcc..bc25482f2ca439709b1f866d574221f2f2698bc1 100644 (file)
@@ -1,6 +1,5 @@
 # src/bin/pg_resetwal/nls.mk
 CATALOG_NAME     = pg_resetwal
-AVAIL_LANGUAGES  = cs de el es fr it ja ko pl pt_BR ru sv tr uk zh_CN
 GETTEXT_FILES    = $(FRONTEND_COMMON_GETTEXT_FILES) pg_resetwal.c ../../common/restricted_token.c
 GETTEXT_TRIGGERS = $(FRONTEND_COMMON_GETTEXT_TRIGGERS)
 GETTEXT_FLAGS    = $(FRONTEND_COMMON_GETTEXT_FLAGS)
diff --git a/src/bin/pg_resetwal/po/LINGUAS b/src/bin/pg_resetwal/po/LINGUAS
new file mode 100644 (file)
index 0000000..7a718f6
--- /dev/null
@@ -0,0 +1 @@
+cs de el es fr it ja ko pl pt_BR ru sv tr uk zh_CN
index e9d91a39cb8583d3c8794f00640a61d10aad4926..0618cb8c2cff51a7ac6d947d93ec4e8c92bd0332 100644 (file)
@@ -1,6 +1,5 @@
 # src/bin/pg_rewind/nls.mk
 CATALOG_NAME     = pg_rewind
-AVAIL_LANGUAGES  = cs de el es fr it ja ko pl pt_BR ru sv tr uk zh_CN
 GETTEXT_FILES    = $(FRONTEND_COMMON_GETTEXT_FILES) datapagemap.c file_ops.c filemap.c libpq_source.c local_source.c parsexlog.c pg_rewind.c timeline.c xlogreader.c ../../common/fe_memutils.c ../../common/restricted_token.c ../../fe_utils/archive.c ../../fe_utils/recovery_gen.c
 GETTEXT_TRIGGERS = $(FRONTEND_COMMON_GETTEXT_TRIGGERS) report_invalid_record:2
 GETTEXT_FLAGS    = $(FRONTEND_COMMON_GETTEXT_FLAGS) \
diff --git a/src/bin/pg_rewind/po/LINGUAS b/src/bin/pg_rewind/po/LINGUAS
new file mode 100644 (file)
index 0000000..7a718f6
--- /dev/null
@@ -0,0 +1 @@
+cs de el es fr it ja ko pl pt_BR ru sv tr uk zh_CN
index 4b4d33b95a1dfeb572963c72bd4da7f7fece8db4..a50782036ca662e994660e06a439cc3ef55bba88 100644 (file)
@@ -1,6 +1,5 @@
 # src/bin/pg_test_fsync/nls.mk
 CATALOG_NAME     = pg_test_fsync
-AVAIL_LANGUAGES  = cs de el es fr ja ko pl ru sv tr uk vi zh_CN
 GETTEXT_FILES    = $(FRONTEND_COMMON_GETTEXT_FILES) pg_test_fsync.c
 GETTEXT_TRIGGERS = $(FRONTEND_COMMON_GETTEXT_TRIGGERS) die
 GETTEXT_FLAGS    = $(FRONTEND_COMMON_GETTEXT_FLAGS)
diff --git a/src/bin/pg_test_fsync/po/LINGUAS b/src/bin/pg_test_fsync/po/LINGUAS
new file mode 100644 (file)
index 0000000..f0979ea
--- /dev/null
@@ -0,0 +1 @@
+cs de el es fr ja ko pl ru sv tr uk vi zh_CN
index 126f45e2cb42bf378b572df8527bbd97b4291da5..331931c591f7d01611de38ebf2f6a181ca4936e0 100644 (file)
@@ -1,4 +1,3 @@
 # src/bin/pg_test_timing/nls.mk
 CATALOG_NAME     = pg_test_timing
-AVAIL_LANGUAGES  = cs de el es fr ja ko pl ru sv tr uk vi zh_CN
 GETTEXT_FILES    = pg_test_timing.c
diff --git a/src/bin/pg_test_timing/po/LINGUAS b/src/bin/pg_test_timing/po/LINGUAS
new file mode 100644 (file)
index 0000000..f0979ea
--- /dev/null
@@ -0,0 +1 @@
+cs de el es fr ja ko pl ru sv tr uk vi zh_CN
index bfaacfbb7c6d45f4776fca705001050d0ddd42db..8a4ebbcbe93f57864a8bd4dccc925782fa6f4066 100644 (file)
@@ -1,6 +1,5 @@
 # src/bin/pg_upgrade/nls.mk
 CATALOG_NAME     = pg_upgrade
-AVAIL_LANGUAGES  = cs de es fr ja ko ru sv tr uk zh_CN
 GETTEXT_FILES    = check.c controldata.c dump.c exec.c file.c function.c \
                    info.c option.c parallel.c pg_upgrade.c relfilenode.c \
                    server.c tablespace.c util.c version.c
diff --git a/src/bin/pg_upgrade/po/LINGUAS b/src/bin/pg_upgrade/po/LINGUAS
new file mode 100644 (file)
index 0000000..ac603ae
--- /dev/null
@@ -0,0 +1 @@
+cs de es fr ja ko ru sv tr uk zh_CN
index 81b96356da6a8c70c6d82b4ac7950a63c5461bf6..eba73a2c0586e9b7a74f066ba4e001116d79dc0f 100644 (file)
@@ -1,6 +1,5 @@
 # src/bin/pg_verifybackup/nls.mk
 CATALOG_NAME     = pg_verifybackup
-AVAIL_LANGUAGES  = de el es fr ja ko ru sv uk zh_CN
 GETTEXT_FILES    = $(FRONTEND_COMMON_GETTEXT_FILES) \
                    parse_manifest.c \
                    pg_verifybackup.c \
diff --git a/src/bin/pg_verifybackup/po/LINGUAS b/src/bin/pg_verifybackup/po/LINGUAS
new file mode 100644 (file)
index 0000000..6db2f24
--- /dev/null
@@ -0,0 +1 @@
+de el es fr ja ko ru sv uk zh_CN
index 159638fc00dcd31cb9d9bf7f25f14da90f509f37..a9eeb6712bc6bf3afe5dd78f33b20ee97e876489 100644 (file)
@@ -1,6 +1,5 @@
 # src/bin/pg_waldump/nls.mk
 CATALOG_NAME     = pg_waldump
-AVAIL_LANGUAGES  = cs de el es fr ja ko ru sv tr uk vi zh_CN
 GETTEXT_FILES    = $(FRONTEND_COMMON_GETTEXT_FILES) pg_waldump.c
 GETTEXT_TRIGGERS = $(FRONTEND_COMMON_GETTEXT_TRIGGERS)
 GETTEXT_FLAGS    = $(FRONTEND_COMMON_GETTEXT_FLAGS)
diff --git a/src/bin/pg_waldump/po/LINGUAS b/src/bin/pg_waldump/po/LINGUAS
new file mode 100644 (file)
index 0000000..3a64d2e
--- /dev/null
@@ -0,0 +1 @@
+cs de el es fr ja ko ru sv tr uk vi zh_CN
index 52c96e3677c52d0d60fb052bd1e82aa04bcd5eaa..dad5816b9c737f2f0230f470c377da19ed6dbc1c 100644 (file)
@@ -1,6 +1,5 @@
 # src/bin/psql/nls.mk
 CATALOG_NAME     = psql
-AVAIL_LANGUAGES  = cs de el es fr he it ja ko pl pt_BR ru sv tr uk zh_CN zh_TW
 GETTEXT_FILES    = $(FRONTEND_COMMON_GETTEXT_FILES) \
                    command.c common.c copy.c crosstabview.c help.c input.c large_obj.c \
                    mainloop.c psqlscanslash.c startup.c \
diff --git a/src/bin/psql/po/LINGUAS b/src/bin/psql/po/LINGUAS
new file mode 100644 (file)
index 0000000..6704d6f
--- /dev/null
@@ -0,0 +1 @@
+cs de el es fr he it ja ko pl pt_BR ru sv tr uk zh_CN zh_TW
index f61ff79396ebde4379afc211bb4461b21ff34235..f4638a06f0daecb6c3cd6a4b73d33a46ca115711 100644 (file)
@@ -1,6 +1,5 @@
 # src/bin/scripts/nls.mk
 CATALOG_NAME     = pgscripts
-AVAIL_LANGUAGES  = cs de el es fr he it ja ko pl pt_BR ru sv tr uk zh_CN
 GETTEXT_FILES    = $(FRONTEND_COMMON_GETTEXT_FILES) \
                    createdb.c createuser.c \
                    dropdb.c dropuser.c \
diff --git a/src/bin/scripts/po/LINGUAS b/src/bin/scripts/po/LINGUAS
new file mode 100644 (file)
index 0000000..508771c
--- /dev/null
@@ -0,0 +1 @@
+cs de el es fr he it ja ko pl pt_BR ru sv tr uk zh_CN
index 2f6b0895f577b91c5abc3a5e47f9743ea7fac6d2..77eecc98f38aff0b266a26a3b251a1e329433f09 100644 (file)
@@ -1,6 +1,5 @@
 # src/interfaces/ecpg/ecpglib/nls.mk
 CATALOG_NAME     = ecpglib
-AVAIL_LANGUAGES  = cs de el es fr it ja ko pl pt_BR ru sv tr uk vi zh_CN
 GETTEXT_FILES    = connect.c descriptor.c error.c execute.c misc.c
 GETTEXT_TRIGGERS = ecpg_gettext
 GETTEXT_FLAGS    = ecpg_gettext:1:pass-c-format
diff --git a/src/interfaces/ecpg/ecpglib/po/LINGUAS b/src/interfaces/ecpg/ecpglib/po/LINGUAS
new file mode 100644 (file)
index 0000000..a13bb1a
--- /dev/null
@@ -0,0 +1 @@
+cs de el es fr it ja ko pl pt_BR ru sv tr uk vi zh_CN
index fed0f7c9e53dec14e2b335145f4a324c9f577895..55ea19a44ed989597ad8ce04fc29515cf18dcd41 100644 (file)
@@ -1,6 +1,5 @@
 # src/interfaces/ecpg/preproc/nls.mk
 CATALOG_NAME     = ecpg
-AVAIL_LANGUAGES  = cs de el es fr it ja ko pl pt_BR ru sv tr uk vi zh_CN zh_TW
 GETTEXT_FILES    = descriptor.c ecpg.c pgc.c preproc.c type.c variable.c
 GETTEXT_TRIGGERS = mmerror:3 mmfatal:2
 GETTEXT_FLAGS    = mmerror:3:c-format mmfatal:2:c-format
diff --git a/src/interfaces/ecpg/preproc/po/LINGUAS b/src/interfaces/ecpg/preproc/po/LINGUAS
new file mode 100644 (file)
index 0000000..991612c
--- /dev/null
@@ -0,0 +1 @@
+cs de el es fr it ja ko pl pt_BR ru sv tr uk vi zh_CN zh_TW
index 1f62ba1b57d6148bb5a21f477fbb44d4ffd84611..9256b426c1d4911e3fda7caf772d408ffe70fc41 100644 (file)
@@ -1,6 +1,5 @@
 # src/interfaces/libpq/nls.mk
 CATALOG_NAME     = libpq
-AVAIL_LANGUAGES  = cs de el es fr he it ja ko pl pt_BR ru sv tr uk zh_CN zh_TW
 GETTEXT_FILES    = fe-auth.c fe-auth-scram.c fe-connect.c fe-exec.c fe-gssapi-common.c fe-lobj.c fe-misc.c fe-protocol3.c fe-secure.c fe-secure-common.c fe-secure-gssapi.c fe-secure-openssl.c win32.c ../../port/thread.c
 GETTEXT_TRIGGERS = libpq_gettext pqInternalNotice:2
 GETTEXT_FLAGS    = libpq_gettext:1:pass-c-format pqInternalNotice:2:c-format
diff --git a/src/interfaces/libpq/po/LINGUAS b/src/interfaces/libpq/po/LINGUAS
new file mode 100644 (file)
index 0000000..6704d6f
--- /dev/null
@@ -0,0 +1 @@
+cs de el es fr he it ja ko pl pt_BR ru sv tr uk zh_CN zh_TW
index c1f7982300ed8a6bae994c9496e89e84239b09b1..ba4f5698038f784b114d5d62c8ed0a2f84cfa415 100644 (file)
@@ -8,7 +8,6 @@
 #
 # CATALOG_NAME          -- name of the message catalog (xxx.po); probably
 #                          name of the program
-# AVAIL_LANGUAGES       -- list of languages that are provided/supported
 # GETTEXT_FILES         -- list of source files that contain message strings
 # GETTEXT_TRIGGERS      -- (optional) list of functions that contain
 #                          translatable strings
@@ -16,6 +15,9 @@
 #                          function arguments that contain C format strings
 #                          (functions must be listed in TRIGGERS and FLAGS)
 #
+# Also, provide a text file 'po/LINGUAS' with a space-separated list
+# of languages that are provided/supported.
+#
 # That's all, the rest is done here, if --enable-nls was specified.
 #
 # The only user-visible targets here are 'init-po', to make an initial
@@ -27,6 +29,8 @@
 # existence checked by Makefile.global; otherwise we won't get here
 include $(srcdir)/nls.mk
 
+AVAIL_LANGUAGES := $(shell sed -e "/^#/d" -e "s/#.*//" po/LINGUAS)
+
 # If user specified the languages he wants in --enable-nls=LANGUAGES,
 # filter out the rest.  Else use all available ones.
 ifdef WANTED_LANGUAGES
index ccdf1c3316b6f4894cb8f4171e697c02992d49db..8c41bfac7a920c3df25c69dda846480c58a6be7c 100644 (file)
@@ -1,6 +1,5 @@
 # src/pl/plperl/nls.mk
 CATALOG_NAME     = plperl
-AVAIL_LANGUAGES  = cs de el es fr it ja ko pl pt_BR ro ru sv tr uk vi zh_CN zh_TW
 GETTEXT_FILES    = plperl.c SPI.c
 GETTEXT_TRIGGERS = $(BACKEND_COMMON_GETTEXT_TRIGGERS)
 GETTEXT_FLAGS    = $(BACKEND_COMMON_GETTEXT_FLAGS)
diff --git a/src/pl/plperl/po/LINGUAS b/src/pl/plperl/po/LINGUAS
new file mode 100644 (file)
index 0000000..37bf941
--- /dev/null
@@ -0,0 +1 @@
+cs de el es fr it ja ko pl pt_BR ro ru sv tr uk vi zh_CN zh_TW
index 11878d2d5b2f8c4470c9fbd302f193468f20b4c1..2bd620a8ddd26ed47ad3b26c49176a70b5c7dcfb 100644 (file)
@@ -1,6 +1,5 @@
 # src/pl/plpgsql/src/nls.mk
 CATALOG_NAME     = plpgsql
-AVAIL_LANGUAGES  = cs de el es fr it ja ko pl pt_BR ro ru sv tr uk vi zh_CN zh_TW
 GETTEXT_FILES    = pl_comp.c pl_exec.c pl_gram.c pl_funcs.c pl_handler.c pl_scanner.c
 GETTEXT_TRIGGERS = $(BACKEND_COMMON_GETTEXT_TRIGGERS) yyerror plpgsql_yyerror
 GETTEXT_FLAGS    = $(BACKEND_COMMON_GETTEXT_FLAGS)
diff --git a/src/pl/plpgsql/src/po/LINGUAS b/src/pl/plpgsql/src/po/LINGUAS
new file mode 100644 (file)
index 0000000..37bf941
--- /dev/null
@@ -0,0 +1 @@
+cs de el es fr it ja ko pl pt_BR ro ru sv tr uk vi zh_CN zh_TW
index c46e26200b77e38d55f5a516abab7749ac2c7595..4c68a0e571de1c40aa1978d2c61397d10ce9fb4f 100644 (file)
@@ -1,6 +1,5 @@
 # src/pl/plpython/nls.mk
 CATALOG_NAME     = plpython
-AVAIL_LANGUAGES  = cs de el es fr it ja ko pl pt_BR ru sv tr uk vi zh_CN
 GETTEXT_FILES    = plpy_cursorobject.c plpy_elog.c plpy_exec.c plpy_main.c plpy_planobject.c plpy_plpymodule.c \
                    plpy_procedure.c plpy_resultobject.c plpy_spi.c plpy_subxactobject.c plpy_typeio.c plpy_util.c
 GETTEXT_TRIGGERS = $(BACKEND_COMMON_GETTEXT_TRIGGERS) PLy_elog:2 PLy_exception_set:2 PLy_exception_set_plural:2,3
diff --git a/src/pl/plpython/po/LINGUAS b/src/pl/plpython/po/LINGUAS
new file mode 100644 (file)
index 0000000..a13bb1a
--- /dev/null
@@ -0,0 +1 @@
+cs de el es fr it ja ko pl pt_BR ru sv tr uk vi zh_CN
index fe6e84a3a4268180e494e4b8759b73a68ace7cc7..8366998df1530f75efa55075648a7b1f188d3af6 100644 (file)
@@ -1,6 +1,5 @@
 # src/pl/tcl/nls.mk
 CATALOG_NAME     = pltcl
-AVAIL_LANGUAGES  = cs de el es fr it ja ko pl pt_BR ro ru sv tr uk vi zh_CN zh_TW
 GETTEXT_FILES    = pltcl.c
 GETTEXT_TRIGGERS = $(BACKEND_COMMON_GETTEXT_TRIGGERS)
 GETTEXT_FLAGS    = $(BACKEND_COMMON_GETTEXT_FLAGS)
diff --git a/src/pl/tcl/po/LINGUAS b/src/pl/tcl/po/LINGUAS
new file mode 100644 (file)
index 0000000..37bf941
--- /dev/null
@@ -0,0 +1 @@
+cs de el es fr it ja ko pl pt_BR ro ru sv tr uk vi zh_CN zh_TW