index d49f44f3f23bf4982ca7ef082cef93fb57019745..4b683458f9c89f34a7764317aed34d1d96e3e4b9 100644 (file)
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 — 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 — initially empty.
+ </para>
+ </step>
</procedure>
<para>
index 355299804f3918fb53ef3233b79aa133705ac188..c31339be31757b561220756b83c8985bb4ced225 100644 (file)
# 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 \
new file mode 100644
(file)
index 0000000..
a27ddd5
--- /dev/null
+de es fr id it ja ko pl pt_BR ru sv tr uk zh_CN
index fe7bdfc04a5f0dcf79aba253742a6119bae1a67e..19c91368493ed0873449e092a2cdefd551b9a538 100644 (file)
# 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)
new file mode 100644
(file)
index 0000000..
3a24184
--- /dev/null
+cs de el es fr he it ja ko pl pt_BR ru sv tr uk vi zh_CN
index 0813fe1cec09974467a773c72b6201da2da44fcd..5e6171952c0f756b432c5c97ed1175a8bfd40021 100644 (file)
# 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 \
new file mode 100644
(file)
index 0000000..
7595b76
--- /dev/null
+de el es fr ja ru sv uk zh_CN
index 51a6767d8d946d71e2d65459c1cd10f5074b3e0b..801cf1c51e8426cf8685f7db8ffb6f29e03d466a 100644 (file)
# 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)
new file mode 100644
(file)
index 0000000..
f0979ea
--- /dev/null
+cs de el es fr ja ko pl ru sv tr uk vi zh_CN
index ec7393d321190f7c72fd2d89b92161fab17caf23..8d28e249dedfb2c723655f38ccb60eb74651a94f 100644 (file)
# 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 \
new file mode 100644
(file)
index 0000000..
9852f70
--- /dev/null
+cs de es fr he it ja ko pl pt_BR ru sv tr uk vi zh_CN
index 5d8fd7e7cc3cf2678bb1cc222e59ae81c7032edf..f7cd2a5ee937116545dabd0c582a34647e9ef26c 100644 (file)
# 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
new file mode 100644
(file)
index 0000000..
78db9ae
--- /dev/null
+cs de el es fr ja ko ru sv tr uk zh_CN
index 77680fa23c0c2debab1e5cab4d669cf20c3ecd62..d86c28c404d682e74fd707cc83b43507b1673f65 100644 (file)
# 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
new file mode 100644
(file)
index 0000000..
8736ee6
--- /dev/null
+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)
# 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)
new file mode 100644
(file)
index 0000000..
a13bb1a
--- /dev/null
+cs de el es fr it ja ko pl pt_BR ru sv tr uk vi zh_CN
index 15b5b4851a20f7a4d6db843c188124f3c8fdbbac..84e7fb4e56084f2ba77658679b5d400864032c68 100644 (file)
# 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
new file mode 100644
(file)
index 0000000..
508771c
--- /dev/null
+cs de el es fr he it ja ko pl pt_BR ru sv tr uk zh_CN
index dc7360db48725b4a9fecd46480dc1dce8b51c7ac..3054f93fadf9f32cd5aa7a21a95b85b0a6c2b1a6 100644 (file)
# 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 \
new file mode 100644
(file)
index 0000000..
508771c
--- /dev/null
+cs de el es fr he it ja ko pl pt_BR ru sv tr uk zh_CN
index 6b85a78828c4550b3c69ffe3eb78dfe24e7c1dcc..bc25482f2ca439709b1f866d574221f2f2698bc1 100644 (file)
# 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)
new file mode 100644
(file)
index 0000000..
7a718f6
--- /dev/null
+cs de el es fr it ja ko pl pt_BR ru sv tr uk zh_CN
index e9d91a39cb8583d3c8794f00640a61d10aad4926..0618cb8c2cff51a7ac6d947d93ec4e8c92bd0332 100644 (file)
# 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) \
new file mode 100644
(file)
index 0000000..
7a718f6
--- /dev/null
+cs de el es fr it ja ko pl pt_BR ru sv tr uk zh_CN
index 4b4d33b95a1dfeb572963c72bd4da7f7fece8db4..a50782036ca662e994660e06a439cc3ef55bba88 100644 (file)
# 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)
new file mode 100644
(file)
index 0000000..
f0979ea
--- /dev/null
+cs de el es fr ja ko pl ru sv tr uk vi zh_CN
index 126f45e2cb42bf378b572df8527bbd97b4291da5..331931c591f7d01611de38ebf2f6a181ca4936e0 100644 (file)
# 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
new file mode 100644
(file)
index 0000000..
f0979ea
--- /dev/null
+cs de el es fr ja ko pl ru sv tr uk vi zh_CN
index bfaacfbb7c6d45f4776fca705001050d0ddd42db..8a4ebbcbe93f57864a8bd4dccc925782fa6f4066 100644 (file)
# 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
new file mode 100644
(file)
index 0000000..
ac603ae
--- /dev/null
+cs de es fr ja ko ru sv tr uk zh_CN
index 81b96356da6a8c70c6d82b4ac7950a63c5461bf6..eba73a2c0586e9b7a74f066ba4e001116d79dc0f 100644 (file)
# 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 \
new file mode 100644
(file)
index 0000000..
6db2f24
--- /dev/null
+de el es fr ja ko ru sv uk zh_CN
index 159638fc00dcd31cb9d9bf7f25f14da90f509f37..a9eeb6712bc6bf3afe5dd78f33b20ee97e876489 100644 (file)
# 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)
new file mode 100644
(file)
index 0000000..
3a64d2e
--- /dev/null
+cs de el es fr ja ko ru sv tr uk vi zh_CN
index 52c96e3677c52d0d60fb052bd1e82aa04bcd5eaa..dad5816b9c737f2f0230f470c377da19ed6dbc1c 100644 (file)
# 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 \
new file mode 100644
(file)
index 0000000..
6704d6f
--- /dev/null
+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)
# 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 \
new file mode 100644
(file)
index 0000000..
508771c
--- /dev/null
+cs de el es fr he it ja ko pl pt_BR ru sv tr uk zh_CN
index 2f6b0895f577b91c5abc3a5e47f9743ea7fac6d2..77eecc98f38aff0b266a26a3b251a1e329433f09 100644 (file)
# 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
new file mode 100644
(file)
index 0000000..
a13bb1a
--- /dev/null
+cs de el es fr it ja ko pl pt_BR ru sv tr uk vi zh_CN
index fed0f7c9e53dec14e2b335145f4a324c9f577895..55ea19a44ed989597ad8ce04fc29515cf18dcd41 100644 (file)
# 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
new file mode 100644
(file)
index 0000000..
991612c
--- /dev/null
+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)
# 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
new file mode 100644
(file)
index 0000000..
6704d6f
--- /dev/null
+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)
#
# 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
# 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
# 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)
# 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)
new file mode 100644
(file)
index 0000000..
37bf941
--- /dev/null
+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)
# 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)
new file mode 100644
(file)
index 0000000..
37bf941
--- /dev/null
+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)
# 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
new file mode 100644
(file)
index 0000000..
a13bb1a
--- /dev/null
+cs de el es fr it ja ko pl pt_BR ru sv tr uk vi zh_CN
index fe6e84a3a4268180e494e4b8759b73a68ace7cc7..8366998df1530f75efa55075648a7b1f188d3af6 100644 (file)
# 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)
new file mode 100644
(file)
index 0000000..
37bf941
--- /dev/null
+cs de el es fr it ja ko pl pt_BR ro ru sv tr uk vi zh_CN zh_TW