Skip to content

Commit 318d7b9

Browse files
committed
PBCKP-97: Adding localization files
Added localization of messages. Fixed some bugs. Added the --enable-nls tag for tests. Added a test to check the localization of messages.
1 parent 0699429 commit 318d7b9

File tree

10 files changed

+2101
-5
lines changed

10 files changed

+2101
-5
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,3 +224,17 @@ Postgres Professional, Moscow, Russia.
224224
## Credits
225225

226226
`pg_probackup` utility is based on `pg_arman`, that was originally written by NTT and then developed and maintained by Michael Paquier.
227+
228+
229+
### Localization files (*.po)
230+
231+
Description of how to add new translation languages.
232+
1. Add a flag --enable-nls in configure.
233+
2. Build postgres.
234+
3. Adding to nls.mk in folder pg_probackup required files in GETTEXT_FILES.
235+
4. In folder pg_probackup do 'make update-po'.
236+
5. As a result, the progname.pot file will be created. Copy the content and add it to the file with the desired language.
237+
6. Adding to nls.mk in folder pg_probackup required language in AVAIL_LANGUAGES.
238+
239+
For more information, follow the link below:
240+
https://postgrespro.ru/docs/postgresql/12/nls-translator

nls.mk

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# contrib/pg_probackup/nls.mk
2+
CATALOG_NAME = pg_probackup
3+
AVAIL_LANGUAGES = ru
4+
GETTEXT_FILES = src/help.c
5+
GETTEXT_TRIGGERS = $(FRONTEND_COMMON_GETTEXT_TRIGGERS)
6+
GETTEXT_FLAGS = $(FRONTEND_COMMON_GETTEXT_FLAGS)

0 commit comments

Comments
 (0)