Skip to content

Commit 4789a1f

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 4789a1f

File tree

10 files changed

+2101
-7
lines changed

10 files changed

+2101
-7
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ sudo wget -O - https://repo.postgrespro.ru/pg_probackup-forks/keys/GPG-KEY-PG_PR
140140
sudo apt-get install pg-probackup-{std,ent}-{13,12,11,10,9.6}
141141
sudo apt-get install pg-probackup-{std,ent}-{13,12,11,10,9.6}-dbg
142142

143+
143144
#DEB Astra Linix Orel
144145
sudo sh -c 'echo "deb [arch=amd64] https://repo.postgrespro.ru/pg_probackup-forks/deb/ stretch main-stretch" > /etc/apt/sources.list.d/pg_probackup.list'
145146
sudo wget -O - https://repo.postgrespro.ru/pg_probackup-forks/keys/GPG-KEY-PG_PROBACKUP | sudo apt-key add - && sudo apt-get update
@@ -224,3 +225,17 @@ Postgres Professional, Moscow, Russia.
224225
## Credits
225226

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