1
0
Fork 0
mirror of https://github.com/nishiki/manage-password.git synced 2024-11-26 23:33:03 +00:00

fix translate for class mpw

This commit is contained in:
nishiki 2016-05-15 23:55:01 +02:00
parent 4108f397d8
commit f423774c2c
3 changed files with 21 additions and 25 deletions

View file

@ -1,8 +1,6 @@
---
en:
error:
client:
no_authorized: "You aren't authorized."
config:
write: "Can't write the config file!"
check: "Checkconfig failed!"
@ -14,18 +12,18 @@ en:
password: "You must define a password for your GPG key!"
delete:
id_no_exist: "Can't delete the item %{id}, it doesn't exist!"
export:
unknown_type: "The data type %{type} is unknown!"
write: "Can't export, unable to write in %{file}!"
export: "Can't export, unable to write in %{file}!"
gpg_file:
decrypt: "Can't decrypt file!"
encrypt: "Can't encrypt the GPG file!"
import:
bad_format: "Can't import, the file is badly formated!"
read: "Can't import, unable to read %{file}!"
mpw_file:
read_data: "Can't to read the MPW file!"
write_data: "Can't to write the MPW file!"
import: "Can't import, unable to read %{file}!"
update:
name_empty: "You must define a name!"
sync:
general: "An error is appeared durint the sync"
connection: "Connection fail!"
communication: "A communication problem with the server is appeared!"
download: "Can't download the file!"
@ -111,7 +109,7 @@ en:
expire: "Expire time of the GPG key [default=0 (unlimited)]: "
wait: "Please waiting during the GPG key generate, this process can take few minutes."
valid: "Your GPG key has been created ;-)"
updatei_item:
update_item:
title: "Update an item"
name: "Enter the name [%{name}]: "
group: "Enter the group [%{group}]: "

View file

@ -1,8 +1,6 @@
---
fr:
error:
client:
no_authorized: "Vous n'êtes pas autorisé!"
config:
write: "Impossible d'écrire le fichier de configuration!"
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!"
delete:
id_no_exist: "Impossible de supprimer l'élément %{id}, car il n'existe pas!"
export:
unknown_type: "Le type de donnée %{type} est inconnu!"
write: "Impossible d'exporter les données dans le fichier %{file}!"
export: "Impossible d'exporter les données dans le fichier %{file}!"
gpg_file:
decrypt: "Impossible de déchiffrer le fichier GPG!"
encrypt: "Impossible de chiffrer le fichier GPG!"
import:
bad_format: "Impossible d'importer le fichier car son format est incorrect!"
read: "Impossible d'importer le fichier %{file}, car il n'est pas lisible!"
mpw_file:
read_data: "Impossible de lire le fichier MPW!"
write_data: "Impossible d'écrire le fichier MPW!"
import: "Impossible d'importer le fichier %{file}, car il n'est pas lisible!"
update:
name_empty: "Vous devez définir un nom!"
sync:
general: "Une erreur est survenue durant la synchronisation"
connection: "La connexion n'a pu être établie!"
communication: "Un problème de communication avec le serveur est apparu!"
download: "Impossible de télécharger le fichier!"

View file

@ -265,7 +265,7 @@ class MPW
File.open(file, 'w') {|f| f << data.to_yaml}
rescue Exception => e
raise "#{I18n.t('error.export.write', file: file)}\n#{e}"
raise "#{I18n.t('error.export', file: file)}\n#{e}"
end
# Import to yaml
@ -287,7 +287,7 @@ class MPW
set_password(item.id, row['password'])
end
rescue Exception => e
raise "#{I18n.t('error.import.read', file: file)}\n#{e}"
raise "#{I18n.t('error.import', file: file)}\n#{e}"
end
# Get last sync
@ -312,7 +312,7 @@ class MPW
require 'mpw/sync/ftp'
sync = SyncFTP.new(@config['sync'])
else
raise I18n.t('error.unknown_type')
raise I18n.t('error.sync.unknown_type')
end
sync.connect
@ -389,7 +389,7 @@ class MPW
rescue Exception => e
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
# Generate a random password