Skip to content

Commit

Permalink
[#656 state:resolved] [#658 state:resolved] Fixed use of version numb…
Browse files Browse the repository at this point in the history
…er (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.
  • Loading branch information
Open Melody Software Group committed Dec 8, 2010
1 parent d0dd89c commit d3284b6
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 34 deletions.
2 changes: 1 addition & 1 deletion lib/MT/App/CMS.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
)
{
Expand Down
21 changes: 12 additions & 9 deletions lib/MT/App/Upgrader.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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...
Expand All @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions lib/MT/L10N/de.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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.'
Expand Down
8 changes: 4 additions & 4 deletions lib/MT/L10N/es.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
8 changes: 4 additions & 4 deletions lib/MT/L10N/fr.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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.'
Expand Down
8 changes: 4 additions & 4 deletions lib/MT/L10N/ja.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
8 changes: 4 additions & 4 deletions lib/MT/L10N/nl.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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.'
Expand Down
8 changes: 4 additions & 4 deletions lib/MT/L10N/ru.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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' => 'Неверный запрос',
Expand Down

0 comments on commit d3284b6

Please sign in to comment.