New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade.php hardcoded text #4465

Closed
wintstar opened this Issue Jan 2, 2018 · 16 comments

Comments

Projects
None yet
4 participants
@wintstar

wintstar commented Jan 2, 2018

During the upgrade process there is no possibility to translate the text in some steps, because it is hardcoded.

Here are just a few:
https://github.com/SimpleMachines/SMF2.1/blob/release-2.1/other/upgrade.php#L218
https://github.com/SimpleMachines/SMF2.1/blob/release-2.1/other/upgrade.php#L939

Another problem is that other language files are not loaded in all steps.

@albertlast

This comment has been minimized.

Show comment
Hide comment
@albertlast

albertlast Jan 2, 2018

Collaborator

I'm not fully understand what you mean with: "other language files are not loaded."

Collaborator

albertlast commented Jan 2, 2018

I'm not fully understand what you mean with: "other language files are not loaded."

@wintstar

This comment has been minimized.

Show comment
Hide comment
@wintstar

wintstar commented Jan 2, 2018

upgrade-1

upgrade-2

upgrade-3

upgrade-4

upgrade-5

upgrade-6

@albertlast

This comment has been minimized.

Show comment
Hide comment
@albertlast

albertlast Jan 2, 2018

Collaborator

Well on my side the upgrader start in german,
what language stand in you settings.php?
look at $language

Collaborator

albertlast commented Jan 2, 2018

Well on my side the upgrader start in german,
what language stand in you settings.php?
look at $language

@frandominguez03

This comment has been minimized.

Show comment
Hide comment
@frandominguez03

frandominguez03 Jan 2, 2018

Member

@albertlast Looks like he has the upgrade.php in German, but not every word is translated on it.
For example, see "Fortschritte" and right below the steps in English.

Member

frandominguez03 commented Jan 2, 2018

@albertlast Looks like he has the upgrade.php in German, but not every word is translated on it.
For example, see "Fortschritte" and right below the steps in English.

@albertlast

This comment has been minimized.

Show comment
Hide comment
@albertlast

albertlast Jan 2, 2018

Collaborator

You need to look different on the pic.
You see that the first pic's are in english fully and
the others are partly in german.
The intresting part for me is,
why are the first steps in english (in my test env) the first page is already in german.

Collaborator

albertlast commented Jan 2, 2018

You need to look different on the pic.
You see that the first pic's are in english fully and
the others are partly in german.
The intresting part for me is,
why are the first steps in english (in my test env) the first page is already in german.

@wintstar

This comment has been minimized.

Show comment
Hide comment
@wintstar

wintstar Jan 2, 2018

Well on my side the upgrader start in german,
what language stand in you settings.php?
look at $language

Yes is english. But if the default language in the admin center is German. Should not standing german in the Settings.php file?
In the Admin Center is German set as default language.

wintstar commented Jan 2, 2018

Well on my side the upgrader start in german,
what language stand in you settings.php?
look at $language

Yes is english. But if the default language in the admin center is German. Should not standing german in the Settings.php file?
In the Admin Center is German set as default language.

@albertlast

This comment has been minimized.

Show comment
Hide comment
@albertlast

albertlast Jan 2, 2018

Collaborator

Dunno,
but so long in the settings.php stand english the upgrade is done in english,
why it switch in the middle of the road would be intressting to know.

Collaborator

albertlast commented Jan 2, 2018

Dunno,
but so long in the settings.php stand english the upgrade is done in english,
why it switch in the middle of the road would be intressting to know.

@wintstar

This comment has been minimized.

Show comment
Hide comment
@wintstar

wintstar Jan 2, 2018

I don't have an explanation. According to my overview in the upgrade.php file, a language package is not defined. As it was changed yesterday in install. php. Maybe it's xampp? This is the basis of my test environment.

wintstar commented Jan 2, 2018

I don't have an explanation. According to my overview in the upgrade.php file, a language package is not defined. As it was changed yesterday in install. php. Maybe it's xampp? This is the basis of my test environment.

@albertlast

This comment has been minimized.

Show comment
Hide comment
@albertlast

albertlast Jan 2, 2018

Collaborator

The upgrade use the install language file see:

SMF2.1/other/upgrade.php

Lines 235 to 237 in db4ee69

// Load the language.
if (file_exists($modSettings['theme_dir'] . '/languages/Install.' . $upcontext['language'] . '.php'))
require_once($modSettings['theme_dir'] . '/languages/Install.' . $upcontext['language'] . '.php');

Collaborator

albertlast commented Jan 2, 2018

The upgrade use the install language file see:

SMF2.1/other/upgrade.php

Lines 235 to 237 in db4ee69

// Load the language.
if (file_exists($modSettings['theme_dir'] . '/languages/Install.' . $upcontext['language'] . '.php'))
require_once($modSettings['theme_dir'] . '/languages/Install.' . $upcontext['language'] . '.php');

@wintstar

This comment has been minimized.

Show comment
Hide comment
@wintstar

wintstar Jan 2, 2018

I know that the install language file is used for the upgrade process. I have completely retranslated the language package for German. But I didn't see that in upgrade.php.

wintstar commented Jan 2, 2018

I know that the install language file is used for the upgrade process. I have completely retranslated the language package for German. But I didn't see that in upgrade.php.

@albertlast

This comment has been minimized.

Show comment
Hide comment
@albertlast

albertlast Jan 2, 2018

Collaborator

Did you not mention that in settings.php stand english? change it to german and you see the translation.

Collaborator

albertlast commented Jan 2, 2018

Did you not mention that in settings.php stand english? change it to german and you see the translation.

@wintstar

This comment has been minimized.

Show comment
Hide comment
@wintstar

wintstar Jan 2, 2018

Yes, I realize that. Should this entry in the setting file not be automatically updated if the German language package is installed and set as default in the Admin Center?

wintstar commented Jan 2, 2018

Yes, I realize that. Should this entry in the setting file not be automatically updated if the German language package is installed and set as default in the Admin Center?

@wintstar

This comment has been minimized.

Show comment
Hide comment
@wintstar

wintstar Jan 2, 2018

I have now german setting in the Settings.php file.
$language = 'german';

However, some texts are not stored with language strings It is not only these

SMF2.1/other/upgrade.php

Lines 86 to 92 in 0c3a4e9

0 => array(1, 'Login', 'WelcomeLogin', 2),
1 => array(2, 'Upgrade Options', 'UpgradeOptions', 2),
2 => array(3, 'Backup', 'BackupDatabase', 10),
3 => array(4, 'Database Changes', 'DatabaseChanges', 50),
4 => array(5, 'Convert to UTF-8', 'ConvertUtf8', 20),
5 => array(6, 'Convert serialized strings to JSON', 'serialize_to_json', 10),
6 => array(7, 'Delete Upgrade.php', 'DeleteUpgrade', 1),

  • Login
  • Upgrade Options
  • Backup
  • Database Changes
  • Convert to UTF-8
  • Convert serialized strings to JSON
  • Delete Upgrade.php

For security purposes please login with your admin account to proceed with the upgrade.

<h3>For security purposes please login with your admin account to proceed with the upgrade.</h3>

upgrade-7

wintstar commented Jan 2, 2018

I have now german setting in the Settings.php file.
$language = 'german';

However, some texts are not stored with language strings It is not only these

SMF2.1/other/upgrade.php

Lines 86 to 92 in 0c3a4e9

0 => array(1, 'Login', 'WelcomeLogin', 2),
1 => array(2, 'Upgrade Options', 'UpgradeOptions', 2),
2 => array(3, 'Backup', 'BackupDatabase', 10),
3 => array(4, 'Database Changes', 'DatabaseChanges', 50),
4 => array(5, 'Convert to UTF-8', 'ConvertUtf8', 20),
5 => array(6, 'Convert serialized strings to JSON', 'serialize_to_json', 10),
6 => array(7, 'Delete Upgrade.php', 'DeleteUpgrade', 1),

  • Login
  • Upgrade Options
  • Backup
  • Database Changes
  • Convert to UTF-8
  • Convert serialized strings to JSON
  • Delete Upgrade.php

For security purposes please login with your admin account to proceed with the upgrade.

<h3>For security purposes please login with your admin account to proceed with the upgrade.</h3>

upgrade-7

@Gwenwyfar Gwenwyfar added the Language label Jan 3, 2018

@frandominguez03

This comment has been minimized.

Show comment
Hide comment
@frandominguez03

frandominguez03 Jan 3, 2018

Member

Yup, there are definitely some hardcoded text strings over there. I don't think it's going to be too difficult to convert them to true $txt strings. I'll give it a go as soon as I can :)

Member

frandominguez03 commented Jan 3, 2018

Yup, there are definitely some hardcoded text strings over there. I don't think it's going to be too difficult to convert them to true $txt strings. I'll give it a go as soon as I can :)

@colinschoen colinschoen assigned Gwenwyfar and unassigned Gwenwyfar Jan 3, 2018

@frandominguez03

This comment has been minimized.

Show comment
Hide comment
@frandominguez03

frandominguez03 Jan 4, 2018

Member

Now working on this.

Member

frandominguez03 commented Jan 4, 2018

Now working on this.

@wintstar

This comment has been minimized.

Show comment
Hide comment
@wintstar

wintstar Jan 4, 2018

Thanks :)
Will update my German translation and give feedback.

wintstar commented Jan 4, 2018

Thanks :)
Will update my German translation and give feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment