mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Use number/name in i18n string to avoid breaking existing translations...
This commit is contained in:
parent
44a66b1ff4
commit
79eb70ec61
2 changed files with 6 additions and 6 deletions
|
@ -228,10 +228,10 @@
|
|||
"migrations_bad_value_for_target": "Invalid number for target argument, available migrations numbers are 0 or {}",
|
||||
"migrations_cant_reach_migration_file": "Can't access migrations files at path %s",
|
||||
"migrations_current_target": "Migration target is {}",
|
||||
"migrations_error_failed_to_load_migration": "ERROR: failed to load migration {migration_id}",
|
||||
"migrations_error_failed_to_load_migration": "ERROR: failed to load migration {number} {name}",
|
||||
"migrations_forward": "Migrating forward",
|
||||
"migrations_list_conflict_pending_done": "You cannot use both --previous and --done at the same time.",
|
||||
"migrations_loading_migration": "Loading migration {migration_id}...",
|
||||
"migrations_loading_migration": "Loading migration {number} {name}...",
|
||||
"migrations_migration_has_failed": "Migration {number} {name} has failed with exception {exception}, aborting",
|
||||
"migrations_no_migrations_to_run": "No migrations to run",
|
||||
"migrations_show_currently_running_migration": "Running migration {number} {name}...",
|
||||
|
|
|
@ -970,9 +970,10 @@ def _load_migration(migration_file):
|
|||
|
||||
migration_id = migration_file[:-len(".py")]
|
||||
|
||||
number, name = migration_id.split("_", 1)
|
||||
|
||||
logger.debug(m18n.n('migrations_loading_migration',
|
||||
migration_id=migration_id,
|
||||
))
|
||||
number=number, name=name))
|
||||
|
||||
try:
|
||||
# this is python builtin method to import a module using a name, we
|
||||
|
@ -985,8 +986,7 @@ def _load_migration(migration_file):
|
|||
traceback.print_exc()
|
||||
|
||||
raise MoulinetteError(errno.EINVAL, m18n.n('migrations_error_failed_to_load_migration',
|
||||
migration_id=migration_id,
|
||||
))
|
||||
number=number, name=name))
|
||||
|
||||
|
||||
class Migration(object):
|
||||
|
|
Loading…
Add table
Reference in a new issue