mirror of
https://github.com/nishiki/manage-password.git
synced 2024-11-27 07:33: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
18
i18n/en.yml
18
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,25 +12,25 @@ 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!"
|
||||||
not_authorized: "You haven't the access to remote file!"
|
not_authorized: "You haven't the access to remote file!"
|
||||||
upload: "Can't upload the file on the server!"
|
upload: "Can't upload the file on the server!"
|
||||||
unknown: "An unknown error is occured!"
|
unknown: "An unknown error is occured!"
|
||||||
unknown_type: "The sync type is unknown"
|
unknown_type: "The sync type is unknown"
|
||||||
|
|
||||||
warning:
|
warning:
|
||||||
select: 'Your choice is not a valid element!'
|
select: 'Your choice is not a valid element!'
|
||||||
|
@ -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}]: "
|
||||||
|
|
16
i18n/fr.yml
16
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,25 +12,25 @@ 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!"
|
||||||
not_authorized: "Vous n'avez pas les autorisations d'accès au fichier distant!"
|
not_authorized: "Vous n'avez pas les autorisations d'accès au fichier distant!"
|
||||||
upload: "Impossible d'envoyer le fichier sur le serveur!"
|
upload: "Impossible d'envoyer le fichier sur le serveur!"
|
||||||
unknown: "Une erreur inconnue est survenue!"
|
unknown: "Une erreur inconnue est survenue!"
|
||||||
unknown_type: "Le type de synchronisation est inconnu"
|
unknown_type: "Le type de synchronisation est inconnu"
|
||||||
|
|
||||||
warning:
|
warning:
|
||||||
select: "Votre choix n'est pas un élément valide!"
|
select: "Votre choix n'est pas un élément valide!"
|
||||||
|
|
|
@ -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