v0.14: Fix localization implementation
This commit is contained in:
parent
4586f71f55
commit
215849fd2a
6 changed files with 10 additions and 18 deletions
2
pom.xml
2
pom.xml
|
@ -8,7 +8,7 @@
|
|||
<name>mplayer4anime</name>
|
||||
|
||||
<artifactId>mplayer4anime</artifactId>
|
||||
<version>0.13-SNAPSHOT</version>
|
||||
<version>0.14-SNAPSHOT</version>
|
||||
|
||||
<packaging>jar</packaging>
|
||||
|
||||
|
|
|
@ -23,11 +23,8 @@ public class AboutWindow {
|
|||
FXMLLoader loaderAbout = new FXMLLoader(getClass().getResource("/About/AboutLayout.fxml"));
|
||||
ResourceBundle resourceBundle;
|
||||
|
||||
if (Locale.getDefault().getISO3Language().equals("rus")) {
|
||||
resourceBundle = ResourceBundle.getBundle("locale", new Locale("ru"));
|
||||
} else {
|
||||
resourceBundle = ResourceBundle.getBundle("locale", new Locale("en"));
|
||||
}
|
||||
Locale userLocale = new Locale(Locale.getDefault().getISO3Language()); // NOTE: user locale based on ISO3 Language codes
|
||||
resourceBundle = ResourceBundle.getBundle("locale", userLocale);
|
||||
loaderAbout.setResources(resourceBundle);
|
||||
|
||||
try {
|
||||
|
|
|
@ -32,11 +32,9 @@ public class MainFX extends Application {
|
|||
public void start(Stage primaryStage) throws Exception{
|
||||
FXMLLoader loader = new FXMLLoader(getClass().getResource("/landingPage.fxml"));
|
||||
|
||||
if (Locale.getDefault().getISO3Language().equals("rus")) {
|
||||
loader.setResources(ResourceBundle.getBundle("locale", new Locale("ru")));
|
||||
} else {
|
||||
loader.setResources(ResourceBundle.getBundle("locale", new Locale("en")));
|
||||
}
|
||||
Locale userLocale = new Locale(Locale.getDefault().getISO3Language()); // NOTE: user locale based on ISO3 Language codes
|
||||
ResourceBundle rb = ResourceBundle.getBundle("locale", userLocale);
|
||||
loader.setResources(rb);
|
||||
|
||||
Parent root = loader.load();
|
||||
|
||||
|
|
|
@ -22,11 +22,8 @@ public class SettingsWindow {
|
|||
FXMLLoader loaderSettings = new FXMLLoader(getClass().getResource("/Settings/SettingsLayout.fxml"));
|
||||
ResourceBundle resourceBundle;
|
||||
|
||||
if (Locale.getDefault().getISO3Language().equals("rus")) {
|
||||
resourceBundle = ResourceBundle.getBundle("locale", new Locale("ru"));
|
||||
} else {
|
||||
resourceBundle = ResourceBundle.getBundle("locale", new Locale("en"));
|
||||
}
|
||||
Locale userLocale = new Locale(Locale.getDefault().getISO3Language()); // NOTE: user locale based on ISO3 Language codes
|
||||
resourceBundle = ResourceBundle.getBundle("locale", userLocale);
|
||||
loaderSettings.setResources(resourceBundle);
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
about_line1=mplayer4amine distributes under GNU GPLv3 license.
|
||||
about_line2=Release: v0.13
|
||||
about_line2=Release: v0.14
|
||||
about_line3=Development & maintenance by Dmitry Isaenko.
|
||||
about_AboutName=About
|
||||
main_tab_audio=Audio
|
|
@ -1,6 +1,6 @@
|
|||
menu_File_Recent=\u041F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435 \u0444\u0430\u0439\u043B\u044B...
|
||||
about_line1=mplayer4amine \u0440\u0430\u0441\u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u044F\u0435\u0442\u0441\u044F \u043F\u043E \u043B\u0438\u0446\u0435\u043D\u0437\u0438\u0438 GNU GPLv3.
|
||||
about_line2=\u0420\u0435\u043B\u0438\u0437: v0.13
|
||||
about_line2=\u0420\u0435\u043B\u0438\u0437: v0.14
|
||||
about_line3=\u0420\u0430\u0437\u0440\u0430\u0431\u043E\u0442\u0430\u043D\u043E \u0438 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F \u0414\u043C\u0438\u0442\u0440\u0438\u0435\u043C \u0418\u0441\u0430\u0435\u043D\u043A\u043E.
|
||||
about_AboutName=\u041E \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438
|
||||
main_tab_audio=\u0410\u0443\u0434\u0438\u043E
|
Loading…
Reference in a new issue