Skip to content

Commit 220310a

Browse files
committed
Corrected the test and readme. Added the --enable-nls tag for tests.
1 parent bb840c8 commit 220310a

File tree

6 files changed

+20
-18
lines changed

6 files changed

+20
-18
lines changed

README.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -140,17 +140,6 @@ 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-
#*.po files
144-
Description of how to add new translation languages.
145-
1. Add a flag --enable-nls in configure.
146-
2. Build postgres.
147-
3. Adding to nls.mk in folder pg_probackup required files in GETTEXT_FILES.
148-
4. In folder pg_probackup do 'make update-po'.
149-
5. As a result, the progname.pot file will be created. Copy the content and add it to the file with the desired language.
150-
6. Adding to nls.mk in folder pg_probackup required language in AVAIL_LANGUAGES.
151-
152-
For more information, follow the link below:
153-
https://postgrespro.ru/docs/postgresql/12/nls-translator
154143

155144
#DEB Astra Linix Orel
156145
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'
@@ -236,3 +225,17 @@ Postgres Professional, Moscow, Russia.
236225
## Credits
237226

238227
`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

po/ru.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ msgstr "Подробнее читайте на сайте <%s>.\n"
578578
#: src/help.c:272
579579
#, c-format
580580
msgid "Report bugs to <%s>.\n"
581-
msgstr "Сообщать об ошибках в <%s>.\n"
581+
msgstr "Сообщайте об ошибках в <%s>.\n"
582582

583583
#: src/help.c:279
584584
#, c-format

tests/Readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Remote backup depends on key authentication to local machine via ssh as current
3131
export PGPROBACKUP_SSH_REMOTE=ON
3232
3333
Run tests that are relied on advanced debugging features. For this mode, pg_probackup should be compiled without optimizations. For example:
34-
CFLAGS="-O0" ./configure --prefix=/path/to/prefix --enable-debug --enable-cassert --enable-depend --enable-tap-tests
34+
CFLAGS="-O0" ./configure --prefix=/path/to/prefix --enable-debug --enable-cassert --enable-depend --enable-tap-tests --enable-nls
3535
3636
export PGPROBACKUP_GDB=ON
3737

tests/expected/option_help_ru.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,4 +181,4 @@ pg_probackup - утилита для управления резервным к
181181
[--help]
182182

183183
Подробнее читайте на сайте <https://github.com/postgrespro/pg_probackup>.
184-
Сообщать об ошибках в <https://github.com/postgrespro/pg_probackup/issues>.
184+
Сообщайте об ошибках в <https://github.com/postgrespro/pg_probackup/issues>.

tests/option.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import unittest
22
import os
33
from .helpers.ptrack_helpers import ProbackupTest, ProbackupException
4+
import locale
45

56

67
module_name = 'option'
@@ -224,12 +225,10 @@ def test_options_5(self):
224225
e.message,
225226
'\n Unexpected Error Message: {0}\n CMD: {1}'.format(repr(e.message), self.cmd))
226227

227-
# Clean after yourself
228-
self.del_test_dir(module_name, fname)
229-
230228
# @unittest.skip("skip")
231229
def test_help_6(self):
232230
"""help options"""
231+
self.test_env['LC_ALL'] = 'ru_RU.utf-8'
233232
with open(os.path.join(self.dir_path, "expected/option_help_ru.out"), "rb") as help_out:
234233
self.assertEqual(
235234
self.run_pb(["--help"]),

travis/run_tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ cd postgres # Go to postgres dir
4747
if [ "$PG_PROBACKUP_PTRACK" = "on" ]; then
4848
git apply -3 ../ptrack/patches/${PTRACK_PATCH_PG_BRANCH}-ptrack-core.diff
4949
fi
50-
CFLAGS="-O0" ./configure --prefix=$PGHOME --enable-debug --enable-cassert --enable-depend --enable-tap-tests
50+
CFLAGS="-O0" ./configure --prefix=$PGHOME --enable-debug --enable-cassert --enable-depend --enable-tap-tests --enable-nls
5151
make -s -j$(nproc) install
5252
#make -s -j$(nproc) -C 'src/common' install
5353
#make -s -j$(nproc) -C 'src/port' install

0 commit comments

Comments
 (0)