From d3284b62efbb8779c56743a229cd28f91aa815a3 Mon Sep 17 00:00:00 2001 From: Open Melody Software Group Date: Wed, 8 Dec 2010 11:13:54 -0800 Subject: [PATCH] [#656 state:resolved] [#658 state:resolved] Fixed use of version number (i.e. API version or corresponding MT version) for basis of Melody upgrades. Now properly uses product version (i.e. Melody's version). Also fixed two translated strings and several translations to properly report the product name. --- lib/MT/App/CMS.pm | 2 +- lib/MT/App/Upgrader.pm | 21 ++++++++++++--------- lib/MT/L10N/de.pm | 8 ++++---- lib/MT/L10N/es.pm | 8 ++++---- lib/MT/L10N/fr.pm | 8 ++++---- lib/MT/L10N/ja.pm | 8 ++++---- lib/MT/L10N/nl.pm | 8 ++++---- lib/MT/L10N/ru.pm | 8 ++++---- 8 files changed, 37 insertions(+), 34 deletions(-) diff --git a/lib/MT/App/CMS.pm b/lib/MT/App/CMS.pm index 739c76332..499e79250 100644 --- a/lib/MT/App/CMS.pm +++ b/lib/MT/App/CMS.pm @@ -394,7 +394,7 @@ sub init_request { if ( !$schema || ( $schema < $app->schema_version ) - || ( ( !$version || ( $version < $app->version_number ) ) + || ( ( !$version || ( $version < $app->product_version ) ) && $app->config->NotifyUpgrade ) ) { diff --git a/lib/MT/App/Upgrader.pm b/lib/MT/App/Upgrader.pm index 815df55ec..68c4b10e0 100644 --- a/lib/MT/App/Upgrader.pm +++ b/lib/MT/App/Upgrader.pm @@ -657,13 +657,15 @@ sub main { }; if ( $author && !$author->is_superuser ) { return $app->errtrans( - "No permissions. Please contact your administrator for upgrading Movable Type." + "No permissions. Please contact your administrator for upgrading [_1].", MT->product_name ); } } - my $cur_schema = MT->schema_version; - my $cur_version = MT->version_number; + my $cur_schema = MT->schema_version; + my $cur_version = MT->product_version; + my $cur_version_id = MT->version_id; + if ( $cur_schema > $schema ) { # yes, MT itself is needing an upgrade... @@ -673,18 +675,19 @@ sub main { $param->{mt_version_incremented} = 1; MT->log( MT->translate( - "Movable Type has been upgraded to version [_1].", - $cur_version + "[_1] has been upgraded to version [_2].", + MT->product_name, $cur_version_id ) ); $app->config->MTVersion( $cur_version, 1 ); $app->config->save_config; } - $param->{help_url} = $app->help_url(); - $param->{to_schema} = $cur_schema; - $param->{from_schema} = $schema; - $param->{mt_version} = $cur_version; + $param->{help_url} = $app->help_url(); + $param->{to_schema} = $cur_schema; + $param->{from_schema} = $schema; + $param->{mt_version} = $cur_version; + $param->{mt_version_id} = $cur_version_id; my @plugins; my $plugin_ver = $app->{cfg}->PluginSchemaVersion; diff --git a/lib/MT/L10N/de.pm b/lib/MT/L10N/de.pm index 0f2dc2d8c..2e55e94c2 100644 --- a/lib/MT/L10N/de.pm +++ b/lib/MT/L10N/de.pm @@ -1190,10 +1190,10 @@ use vars qw( @ISA %Lexicon ); 'The path provided below is not writable.' => 'Der unten angegebene Pfad ist nicht beschreibbar.', 'Invalid session.' => 'Ungültige Session', - 'No permissions. Please contact your administrator for upgrading Melody.' - => 'Bitte kontaktieren Sie Ihren Administrator, um das Upgrade von Melody durchzuführen. Sie haben nicht die erforderlichen Rechte.', - 'Melody has been upgraded to version [_1].' => - 'Melody erfolgreich auf Version [_1] aktualisiert.', + 'No permissions. Please contact your administrator for upgrading [_1].' + => 'Bitte kontaktieren Sie Ihren Administrator, um das Upgrade von [_1] durchzuführen. Sie haben nicht die erforderlichen Rechte.', + '[_1] has been upgraded to version [_2].' => + '[_1] erfolgreich auf Version [_2] aktualisiert.', ## lib/MT/App/Search/Legacy.pm 'You are currently performing a search. Please wait until your search is completed.' diff --git a/lib/MT/L10N/es.pm b/lib/MT/L10N/es.pm index c519f9024..095433168 100644 --- a/lib/MT/L10N/es.pm +++ b/lib/MT/L10N/es.pm @@ -2689,10 +2689,10 @@ que la dirección provista es correcta y le pertenece.', 'The path provided below is not writable.' => 'No se puede escribir en la ruta provista abajo.', 'Invalid session.' => 'Sesión no válida.', - 'No permissions. Please contact your administrator for upgrading Movable Type.' - => 'Sin permiso. Por favor contacte a su administrador para actualizar Melody.', - 'Movable Type has been upgraded to version [_1].' => - 'Melody ha sido actualizado a la versión [_1].', + 'No permissions. Please contact your administrator for upgrading [_1].' + => 'Sin permiso. Por favor contacte a su administrador para actualizar [_1].', + '[_1] has been upgraded to version [_2].' => + '[_1] ha sido actualizado a la versión [_2].', ## lib/MT/App/Search.pm 'Invalid [_1] parameter.' => 'Parámetro [_1] no válido', diff --git a/lib/MT/L10N/fr.pm b/lib/MT/L10N/fr.pm index 19097d478..30e7e6115 100644 --- a/lib/MT/L10N/fr.pm +++ b/lib/MT/L10N/fr.pm @@ -1229,10 +1229,10 @@ use vars qw( @ISA %Lexicon ); 'The path provided below is not writable.' => 'Le chemin ci-dessous n\'est pas ouvert en écriture', 'Invalid session.' => 'Session invalide.', - 'No permissions. Please contact your administrator for upgrading Melody.' - => 'Pas d\'autorisation. Contactez votre administrateur système Melody pour modifier vos privilèges.', - 'Melody has been upgraded to version [_1].' => - 'Melody a été mis à jour à la version [_1].', + 'No permissions. Please contact your administrator for upgrading [_1].' + => 'Pas d\'autorisation. Contactez votre administrateur système [_1] pour modifier vos privilèges.', + '[_1] has been upgraded to version [_2].' => + '[_1] a été mis à jour à la version [_2].', ## lib/MT/App/Search/Legacy.pm 'You are currently performing a search. Please wait until your search is completed.' diff --git a/lib/MT/L10N/ja.pm b/lib/MT/L10N/ja.pm index eb97a2919..db8c7d074 100644 --- a/lib/MT/L10N/ja.pm +++ b/lib/MT/L10N/ja.pm @@ -989,10 +989,10 @@ LDAPディレクトリ上にユーザーがまだ残っている場合、いつ 'The path provided below is not writable.' => '指定されたパスに書き込みできません。', 'Invalid session.' => 'セッションが不正です。', - 'No permissions. Please contact your administrator for upgrading Melody.' - => '権限がありません。Melodyのアップグレードを管理者に依頼してください。', - 'Melody has been upgraded to version [_1].' => - 'Melodyをバージョン[_1]にアップグレードしました。', + 'No permissions. Please contact your administrator for upgrading [_1].' + => '権限がありません。[_1]のアップグレードを管理者に依頼してください。', + '[_1] has been upgraded to version [_2].' => + '[_1]をバージョン[_2]にアップグレードしました。', ## lib/MT/App/Viewer.pm 'Loading blog with ID [_1] failed' => 'Loading blog with ID [_1] failed', diff --git a/lib/MT/L10N/nl.pm b/lib/MT/L10N/nl.pm index 3b1dce35e..a62c18585 100644 --- a/lib/MT/L10N/nl.pm +++ b/lib/MT/L10N/nl.pm @@ -1202,10 +1202,10 @@ use vars qw( @ISA %Lexicon ); 'The path provided below is not writable.' => 'Het pad dat hieronder werd opgegeven is niet beschrijfbaar.', 'Invalid session.' => 'Ongeldige sessie.', - 'No permissions. Please contact your administrator for upgrading Melody.' - => 'Geen permissies. Gelieve uw administrator te contacteren om Melody te upgraden.', - 'Melody has been upgraded to version [_1].' => - 'Melody is bijgewerkt tot versie [_1]', + 'No permissions. Please contact your administrator for upgrading [_1].' + => 'Geen permissies. Gelieve uw administrator te contacteren om [_1] te upgraden.', + '[_1] has been upgraded to version [_2].' => + '[_1] is bijgewerkt tot versie [_2]', ## lib/MT/App/Search/Legacy.pm 'You are currently performing a search. Please wait until your search is completed.' diff --git a/lib/MT/L10N/ru.pm b/lib/MT/L10N/ru.pm index 0b656e88b..0faa78a13 100644 --- a/lib/MT/L10N/ru.pm +++ b/lib/MT/L10N/ru.pm @@ -799,10 +799,10 @@ sub numerate { 'The path provided below is not writable.' => 'Указанный ниже путь не перезаписываемый.', 'Invalid session.' => 'Неверная сессия.', - 'No permissions. Please contact your administrator for upgrading Melody.' - => 'Недостаточно прав для выполнения этого действия. Пожалуйста, свяжитесь с администратором для обновления Melody.', - 'Melody has been upgraded to version [_1].' => - 'Melody обновлён до версии [_1].', + 'No permissions. Please contact your administrator for upgrading [_1].' + => 'Недостаточно прав для выполнения этого действия. Пожалуйста, свяжитесь с администратором для обновления [_1].', + '[_1] has been upgraded to version [_1].' => + '[_1] обновлён до версии [_1].', ## lib/MT/App/CMS.pm 'Invalid request' => 'Неверный запрос',