mirror of
https://github.com/nishiki/manage-password.git
synced 2024-11-30 08:53:05 +00:00
fix translate for class mpw
This commit is contained in:
parent
4108f397d8
commit
f423774c2c
3 changed files with 21 additions and 25 deletions
16
i18n/en.yml
16
i18n/en.yml
|
@ -1,8 +1,6 @@
|
||||||
---
|
---
|
||||||
en:
|
en:
|
||||||
error:
|
error:
|
||||||
client:
|
|
||||||
no_authorized: "You aren't authorized."
|
|
||||||
config:
|
config:
|
||||||
write: "Can't write the config file!"
|
write: "Can't write the config file!"
|
||||||
check: "Checkconfig failed!"
|
check: "Checkconfig failed!"
|
||||||
|
@ -14,18 +12,18 @@ en:
|
||||||
password: "You must define a password for your GPG key!"
|
password: "You must define a password for your GPG key!"
|
||||||
delete:
|
delete:
|
||||||
id_no_exist: "Can't delete the item %{id}, it doesn't exist!"
|
id_no_exist: "Can't delete the item %{id}, it doesn't exist!"
|
||||||
export:
|
export: "Can't export, unable to write in %{file}!"
|
||||||
unknown_type: "The data type %{type} is unknown!"
|
|
||||||
write: "Can't export, unable to write in %{file}!"
|
|
||||||
gpg_file:
|
gpg_file:
|
||||||
decrypt: "Can't decrypt file!"
|
decrypt: "Can't decrypt file!"
|
||||||
encrypt: "Can't encrypt the GPG file!"
|
encrypt: "Can't encrypt the GPG file!"
|
||||||
import:
|
mpw_file:
|
||||||
bad_format: "Can't import, the file is badly formated!"
|
read_data: "Can't to read the MPW file!"
|
||||||
read: "Can't import, unable to read %{file}!"
|
write_data: "Can't to write the MPW file!"
|
||||||
|
import: "Can't import, unable to read %{file}!"
|
||||||
update:
|
update:
|
||||||
name_empty: "You must define a name!"
|
name_empty: "You must define a name!"
|
||||||
sync:
|
sync:
|
||||||
|
general: "An error is appeared durint the sync"
|
||||||
connection: "Connection fail!"
|
connection: "Connection fail!"
|
||||||
communication: "A communication problem with the server is appeared!"
|
communication: "A communication problem with the server is appeared!"
|
||||||
download: "Can't download the file!"
|
download: "Can't download the file!"
|
||||||
|
@ -111,7 +109,7 @@ en:
|
||||||
expire: "Expire time of the GPG key [default=0 (unlimited)]: "
|
expire: "Expire time of the GPG key [default=0 (unlimited)]: "
|
||||||
wait: "Please waiting during the GPG key generate, this process can take few minutes."
|
wait: "Please waiting during the GPG key generate, this process can take few minutes."
|
||||||
valid: "Your GPG key has been created ;-)"
|
valid: "Your GPG key has been created ;-)"
|
||||||
updatei_item:
|
update_item:
|
||||||
title: "Update an item"
|
title: "Update an item"
|
||||||
name: "Enter the name [%{name}]: "
|
name: "Enter the name [%{name}]: "
|
||||||
group: "Enter the group [%{group}]: "
|
group: "Enter the group [%{group}]: "
|
||||||
|
|
14
i18n/fr.yml
14
i18n/fr.yml
|
@ -1,8 +1,6 @@
|
||||||
---
|
---
|
||||||
fr:
|
fr:
|
||||||
error:
|
error:
|
||||||
client:
|
|
||||||
no_authorized: "Vous n'êtes pas autorisé!"
|
|
||||||
config:
|
config:
|
||||||
write: "Impossible d'écrire le fichier de configuration!"
|
write: "Impossible d'écrire le fichier de configuration!"
|
||||||
check: "Le fichier de configuration est invalide!"
|
check: "Le fichier de configuration est invalide!"
|
||||||
|
@ -14,18 +12,18 @@ fr:
|
||||||
password: "Vous devez définir un mot de passe pour votre clé GPG!"
|
password: "Vous devez définir un mot de passe pour votre clé GPG!"
|
||||||
delete:
|
delete:
|
||||||
id_no_exist: "Impossible de supprimer l'élément %{id}, car il n'existe pas!"
|
id_no_exist: "Impossible de supprimer l'élément %{id}, car il n'existe pas!"
|
||||||
export:
|
export: "Impossible d'exporter les données dans le fichier %{file}!"
|
||||||
unknown_type: "Le type de donnée %{type} est inconnu!"
|
|
||||||
write: "Impossible d'exporter les données dans le fichier %{file}!"
|
|
||||||
gpg_file:
|
gpg_file:
|
||||||
decrypt: "Impossible de déchiffrer le fichier GPG!"
|
decrypt: "Impossible de déchiffrer le fichier GPG!"
|
||||||
encrypt: "Impossible de chiffrer le fichier GPG!"
|
encrypt: "Impossible de chiffrer le fichier GPG!"
|
||||||
import:
|
mpw_file:
|
||||||
bad_format: "Impossible d'importer le fichier car son format est incorrect!"
|
read_data: "Impossible de lire le fichier MPW!"
|
||||||
read: "Impossible d'importer le fichier %{file}, car il n'est pas lisible!"
|
write_data: "Impossible d'écrire le fichier MPW!"
|
||||||
|
import: "Impossible d'importer le fichier %{file}, car il n'est pas lisible!"
|
||||||
update:
|
update:
|
||||||
name_empty: "Vous devez définir un nom!"
|
name_empty: "Vous devez définir un nom!"
|
||||||
sync:
|
sync:
|
||||||
|
general: "Une erreur est survenue durant la synchronisation"
|
||||||
connection: "La connexion n'a pu être établie!"
|
connection: "La connexion n'a pu être établie!"
|
||||||
communication: "Un problème de communication avec le serveur est apparu!"
|
communication: "Un problème de communication avec le serveur est apparu!"
|
||||||
download: "Impossible de télécharger le fichier!"
|
download: "Impossible de télécharger le fichier!"
|
||||||
|
|
|
@ -265,7 +265,7 @@ class MPW
|
||||||
|
|
||||||
File.open(file, 'w') {|f| f << data.to_yaml}
|
File.open(file, 'w') {|f| f << data.to_yaml}
|
||||||
rescue Exception => e
|
rescue Exception => e
|
||||||
raise "#{I18n.t('error.export.write', file: file)}\n#{e}"
|
raise "#{I18n.t('error.export', file: file)}\n#{e}"
|
||||||
end
|
end
|
||||||
|
|
||||||
# Import to yaml
|
# Import to yaml
|
||||||
|
@ -287,7 +287,7 @@ class MPW
|
||||||
set_password(item.id, row['password'])
|
set_password(item.id, row['password'])
|
||||||
end
|
end
|
||||||
rescue Exception => e
|
rescue Exception => e
|
||||||
raise "#{I18n.t('error.import.read', file: file)}\n#{e}"
|
raise "#{I18n.t('error.import', file: file)}\n#{e}"
|
||||||
end
|
end
|
||||||
|
|
||||||
# Get last sync
|
# Get last sync
|
||||||
|
@ -312,7 +312,7 @@ class MPW
|
||||||
require 'mpw/sync/ftp'
|
require 'mpw/sync/ftp'
|
||||||
sync = SyncFTP.new(@config['sync'])
|
sync = SyncFTP.new(@config['sync'])
|
||||||
else
|
else
|
||||||
raise I18n.t('error.unknown_type')
|
raise I18n.t('error.sync.unknown_type')
|
||||||
end
|
end
|
||||||
|
|
||||||
sync.connect
|
sync.connect
|
||||||
|
@ -389,7 +389,7 @@ class MPW
|
||||||
rescue Exception => e
|
rescue Exception => e
|
||||||
File.unlink(tmp_file) if File.exist?(tmp_file)
|
File.unlink(tmp_file) if File.exist?(tmp_file)
|
||||||
|
|
||||||
raise "#{I18n.t('error.sync.unknown')}\n#{e}"
|
raise "#{I18n.t('error.sync.general')}\n#{e}"
|
||||||
end
|
end
|
||||||
|
|
||||||
# Generate a random password
|
# Generate a random password
|
||||||
|
|
Loading…
Reference in a new issue