Skip to content

Commit 0dc7705

Browse files
committed
fixed I18n translations
1 parent b1791b0 commit 0dc7705

File tree

4 files changed

+384
-0
lines changed

4 files changed

+384
-0
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# 2.x branch
22
## 2.8 branch
3+
### 2.8.1
4+
* fixed I18n translations.
5+
36
### 2.8.0
47
* updated for `cakephp` 4 and `phpunit` 8.
58

Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
# LANGUAGE translation of cakephp-database-backup plugin
2+
# Copyright Mirko Pagliai <mirko.pagliai@gmail.com>
3+
#
4+
#, fuzzy
5+
msgid ""
6+
msgstr ""
7+
"POT-Creation-Date: 2019-12-18 16:44+0100\n"
8+
"PO-Revision-Date: YYYY-mm-DD HH:MM+ZZZZ\n"
9+
"Last-Translator: NAME <EMAIL@ADDRESS>\n"
10+
"MIME-Version: 1.0\n"
11+
"Content-Type: text/plain; charset=utf-8\n"
12+
"Content-Transfer-Encoding: 8bit\n"
13+
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
14+
15+
#: BackupTrait.php:56
16+
msgid "Binary for `{0}` could not be found. You have to set its path manually"
17+
msgstr ""
18+
19+
#: BackupTrait.php:104
20+
msgid "The `{0}` driver does not exist"
21+
msgstr ""
22+
23+
#: Command/DeleteAllCommand.php:34
24+
msgid "Deletes all database backups"
25+
msgstr ""
26+
27+
#: Command/DeleteAllCommand.php:52
28+
#: Command/RotateCommand.php:62
29+
msgid "No backup has been deleted"
30+
msgstr ""
31+
32+
#: Command/DeleteAllCommand.php:58
33+
#: Command/RotateCommand.php:68
34+
msgid "Backup `{0}` has been deleted"
35+
msgstr ""
36+
37+
#: Command/DeleteAllCommand.php:61
38+
#: Command/RotateCommand.php:71
39+
msgid "Deleted backup files: {0}"
40+
msgstr ""
41+
42+
#: Command/ExportCommand.php:37
43+
msgid "Exports a database backup"
44+
msgstr ""
45+
46+
#: Command/ExportCommand.php:41
47+
msgid "Compression type. By default, no compression will be used"
48+
msgstr ""
49+
50+
#: Command/ExportCommand.php:45
51+
msgid "Filename. It can be an absolute path and may contain patterns. The compression type will be automatically setted"
52+
msgstr ""
53+
54+
#: Command/ExportCommand.php:50
55+
msgid "Rotates backups. You have to indicate the number of backups you want to keep. So, it will delete all backups that are older. By default, no backup will be deleted"
56+
msgstr ""
57+
58+
#: Command/ExportCommand.php:56
59+
msgid "Sends the backup file via email. You have to indicate the recipient's email address"
60+
msgstr ""
61+
62+
#: Command/ExportCommand.php:94
63+
msgid "Backup `{0}` has been exported"
64+
msgstr ""
65+
66+
#: Command/ImportCommand.php:35
67+
msgid "Imports a database backup"
68+
msgstr ""
69+
70+
#: Command/ImportCommand.php:37
71+
#: Command/SendCommand.php:38
72+
msgid "Filename. It can be an absolute path"
73+
msgstr ""
74+
75+
#: Command/ImportCommand.php:57
76+
msgid "Backup `{0}` has been imported"
77+
msgstr ""
78+
79+
#: Command/IndexCommand.php:36
80+
msgid "Lists database backups"
81+
msgstr ""
82+
83+
#: Command/IndexCommand.php:53
84+
msgid "Backup files found: {0}"
85+
msgstr ""
86+
87+
#: Command/IndexCommand.php:60
88+
msgid "Filename"
89+
msgstr ""
90+
91+
#: Command/IndexCommand.php:61
92+
msgid "Extension"
93+
msgstr ""
94+
95+
#: Command/IndexCommand.php:62
96+
msgid "Compression"
97+
msgstr ""
98+
99+
#: Command/IndexCommand.php:63
100+
msgid "Size"
101+
msgstr ""
102+
103+
#: Command/IndexCommand.php:64
104+
msgid "Datetime"
105+
msgstr ""
106+
107+
#: Command/RotateCommand.php:35
108+
msgid "Rotates backups"
109+
msgstr ""
110+
111+
#: Command/RotateCommand.php:37
112+
msgid "Number of backups you want to keep. So, it will delete all backups that are older"
113+
msgstr ""
114+
115+
#: Command/SendCommand.php:35
116+
msgid "Send a database backup via mail"
117+
msgstr ""
118+
119+
#: Command/SendCommand.php:42
120+
msgid "Recipient's email address"
121+
msgstr ""
122+
123+
#: Command/SendCommand.php:62
124+
msgid "Backup `{0}` was sent via mail"
125+
msgstr ""
126+
127+
#: Console/Command.php:38
128+
msgid "Connection: {0}"
129+
msgstr ""
130+
131+
#: Console/Command.php:39
132+
msgid "Driver: {0}"
133+
msgstr ""
134+
135+
#: Driver/Driver.php:185
136+
#: Driver/Driver.php:228
137+
msgid "Failed with exit code `{0}`"
138+
msgstr ""
139+
140+
#: Utility/BackupExport.php:119
141+
msgid "Invalid compression type"
142+
msgstr ""
143+
144+
#: Utility/BackupExport.php:155
145+
msgid "File `{0}` already exists"
146+
msgstr ""
147+
148+
#: Utility/BackupExport.php:160
149+
#: Utility/BackupImport.php:66
150+
msgid "Invalid file extension"
151+
msgstr ""
152+
153+
#: Utility/BackupImport.php:87
154+
msgid "You must first set the filename"
155+
msgstr ""
156+
157+
#: Utility/BackupManager.php:100
158+
msgid "Invalid rotate value"
159+
msgstr ""
160+
161+
#: Utility/BackupManager.php:128
162+
msgid "Database backup {0} from {1}"
163+
msgstr ""
164+
Lines changed: 183 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,183 @@
1+
# LANGUAGE translation of cakephp-database-backup plugin
2+
# Copyright Mirko Pagliai <mirko.pagliai@gmail.com>
3+
#
4+
msgid ""
5+
msgstr ""
6+
"POT-Creation-Date: 2019-12-18 16:44+0100\n"
7+
"PO-Revision-Date: 2019-12-18 16:44+0100\n"
8+
"Last-Translator: Mirko Pagliai <mirko.pagliai@gmail.com>\n"
9+
"MIME-Version: 1.0\n"
10+
"Content-Type: text/plain; charset=UTF-8\n"
11+
"Content-Transfer-Encoding: 8bit\n"
12+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
13+
"Language: it\n"
14+
15+
#: BackupTrait.php:56
16+
msgid "Binary for `{0}` could not be found. You have to set its path manually"
17+
msgstr ""
18+
"Il binario di `{0}` non è stato trovato. Devi indicare manualmente la sua path"
19+
20+
#: BackupTrait.php:104
21+
msgid "The `{0}` driver does not exist"
22+
msgstr "Il driver `{0}` non esiste"
23+
24+
#: Command/DeleteAllCommand.php:34
25+
msgid "Deletes all database backups"
26+
msgstr "Cancella tutti i backup del database"
27+
28+
#: Command/DeleteAllCommand.php:52
29+
#: Command/RotateCommand.php:62
30+
msgid "No backup has been deleted"
31+
msgstr "Nessun backup è stato cancellato"
32+
33+
#: Command/DeleteAllCommand.php:58
34+
#: Command/RotateCommand.php:68
35+
msgid "Backup `{0}` has been deleted"
36+
msgstr "Il backup `{0}` è stato cancellato"
37+
38+
#: Command/DeleteAllCommand.php:61
39+
#: Command/RotateCommand.php:71
40+
msgid "Deleted backup files: {0}"
41+
msgstr "File di backup cancellati: {0}"
42+
43+
#: Command/ExportCommand.php:37
44+
msgid "Exports a database backup"
45+
msgstr "Esporta un backup del database"
46+
47+
#: Command/ExportCommand.php:41
48+
msgid "Compression type. By default, no compression will be used"
49+
msgstr "Tipo di compressione. Di default, nessuna compressione sarà utilizzata"
50+
51+
#: Command/ExportCommand.php:45
52+
msgid ""
53+
"Filename. It can be an absolute path and may contain patterns. The"
54+
" compression type will be automatically setted"
55+
msgstr ""
56+
"Filename. Può essere un percorso assoluto e può contenere pattern. Il tipo di"
57+
" compressione verrà automaticamente impostato"
58+
59+
#: Command/ExportCommand.php:50
60+
msgid ""
61+
"Rotates backups. You have to indicate the number of backups you want to keep."
62+
" So, it will delete all backups that are older. By default, no backup will be"
63+
" deleted"
64+
msgstr ""
65+
"Ruota i backup. Devi indicare il numero di backup che vuoi mantenere. Quindi,"
66+
" cancellerà tutti i backup più vecchi. Di default, nessun backup verrà"
67+
" cancellato"
68+
69+
#: Command/ExportCommand.php:56
70+
msgid ""
71+
"Sends the backup file via email. You have to indicate the recipient's email"
72+
" address"
73+
msgstr ""
74+
"Invia il backup via mail. Devi indicare l'indirizzo email del destinatario"
75+
76+
#: Command/ExportCommand.php:94
77+
msgid "Backup `{0}` has been exported"
78+
msgstr "Il backup `{0}` è stato esportato"
79+
80+
#: Command/ImportCommand.php:35
81+
msgid "Imports a database backup"
82+
msgstr "Importa un backup del database"
83+
84+
#: Command/ImportCommand.php:37
85+
#: Command/SendCommand.php:38
86+
msgid "Filename. It can be an absolute path"
87+
msgstr "Filename. Può essere un percorso assoluto"
88+
89+
#: Command/ImportCommand.php:57
90+
msgid "Backup `{0}` has been imported"
91+
msgstr "Il backup `{0}` è stato importato"
92+
93+
#: Command/IndexCommand.php:36
94+
msgid "Lists database backups"
95+
msgstr "Elenca i backup del database"
96+
97+
#: Command/IndexCommand.php:53
98+
msgid "Backup files found: {0}"
99+
msgstr "File di backup trovati: {0}"
100+
101+
#: Command/IndexCommand.php:60
102+
msgid "Filename"
103+
msgstr "Filename"
104+
105+
#: Command/IndexCommand.php:61
106+
msgid "Extension"
107+
msgstr "Estensione"
108+
109+
#: Command/IndexCommand.php:62
110+
msgid "Compression"
111+
msgstr "Compressione"
112+
113+
#: Command/IndexCommand.php:63
114+
msgid "Size"
115+
msgstr "Dimensione"
116+
117+
#: Command/IndexCommand.php:64
118+
msgid "Datetime"
119+
msgstr "Data e orario"
120+
121+
#: Command/RotateCommand.php:35
122+
msgid "Rotates backups"
123+
msgstr "Ruota i backup"
124+
125+
#: Command/RotateCommand.php:37
126+
msgid ""
127+
"Number of backups you want to keep. So, it will delete all backups that are"
128+
" older"
129+
msgstr ""
130+
"Numero di backup che vuoi mantenere. Quindi, cancellerà tutti i backup più"
131+
" vecchi"
132+
133+
#: Command/SendCommand.php:35
134+
msgid "Send a database backup via mail"
135+
msgstr "Invia un backup del database tramite mail"
136+
137+
#: Command/SendCommand.php:42
138+
msgid "Recipient's email address"
139+
msgstr "Indirizzo email del destinatario"
140+
141+
#: Command/SendCommand.php:62
142+
msgid "Backup `{0}` was sent via mail"
143+
msgstr "Il backup `{0}` è stato inviato tramite mail"
144+
145+
#: Console/Command.php:38
146+
msgid "Connection: {0}"
147+
msgstr "Connessione: {0}"
148+
149+
#: Console/Command.php:39
150+
msgid "Driver: {0}"
151+
msgstr "Driver: {0}"
152+
153+
#: Driver/Driver.php:185
154+
#: Driver/Driver.php:228
155+
msgid "Failed with exit code `{0}`"
156+
msgstr "Fallito con codice di uscita `{0}`"
157+
158+
#: Utility/BackupExport.php:119
159+
msgid "Invalid compression type"
160+
msgstr "Tipo di compressione non valido"
161+
162+
#: Utility/BackupExport.php:155
163+
msgid "File `{0}` already exists"
164+
msgstr "Il file `{0}` già esiste"
165+
166+
#: Utility/BackupExport.php:160
167+
#: Utility/BackupImport.php:66
168+
msgid "Invalid file extension"
169+
msgstr "Estensione del file non valida"
170+
171+
#: Utility/BackupImport.php:87
172+
msgid "You must first set the filename"
173+
msgstr "Devi prima impostare il filename"
174+
175+
#: Utility/BackupManager.php:100
176+
msgid "Invalid rotate value"
177+
msgstr "Valore rotazione non valido"
178+
179+
#: Utility/BackupManager.php:128
180+
msgid "Database backup {0} from {1}"
181+
msgstr "Backup del database {0} da {1}"
182+
183+

tests/TestCase/I18nTest.php

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?php
2+
declare(strict_types=1);
3+
/**
4+
* This file is part of cakephp-database-backup.
5+
*
6+
* Licensed under The MIT License
7+
* For full copyright and license information, please see the LICENSE.txt
8+
* Redistributions of files must retain the above copyright notice.
9+
*
10+
* @copyright Copyright (c) Mirko Pagliai
11+
* @link https://github.com/mirko-pagliai/cakephp-database-backup
12+
* @license https://opensource.org/licenses/mit-license.php MIT License
13+
*/
14+
15+
namespace DatabaseBackup\Test\TestCase;
16+
17+
use Cake\I18n\I18n;
18+
use DatabaseBackup\TestSuite\TestCase;
19+
20+
/**
21+
* I18nTest class
22+
*/
23+
class I18nTest extends TestCase
24+
{
25+
/**
26+
* Tests I18n translations
27+
* @test
28+
*/
29+
public function testI18nConstant()
30+
{
31+
$translator = I18n::getTranslator('database_backup', 'it');
32+
$this->assertEquals('Esporta un backup del database', $translator->translate('Exports a database backup'));
33+
}
34+
}

0 commit comments

Comments
 (0)