OSDN Git Service

refactor: add some translation
authorhizumiaoba <56146205+hizumiaoba@users.noreply.github.com>
Mon, 13 Dec 2021 14:30:12 +0000 (23:30 +0900)
committerhizumiaoba <56146205+hizumiaoba@users.noreply.github.com>
Mon, 13 Dec 2021 14:30:12 +0000 (23:30 +0900)
src/com/ranfa/languages/List_en_US.properties
src/com/ranfa/languages/List_ja_JP.properties
src/com/ranfa/main/Messages.java
src/test/LanguageTest.java

index 77da72d..c2e3571 100644 (file)
@@ -1,2 +1,3 @@
 MSGCalcStart:Start!
-MSGDatabaseNotExist:Music database does not exist.\nIt will be automatically created.\nATTENTION:There is the JSON file named \"database.json\" in the same directory which executable is contained and you see this pop up,\nPlease contact the Developer.\nGithub URL: https://github.com/hizumiaoba/DelesteRandomSelector/issues
\ No newline at end of file
+MSGDatabaseNotExist:Music database does not exist.\nIt will be automatically created.\nATTENTION:There is the JSON file named \"database.json\" in the same directory which executable is contained and you see this pop up,\nPlease contact the Developer.\nGithub URL: https://github.com/hizumiaoba/DelesteRandomSelector/issues
+MSGAlbumTypeBeingCalculated:Simulating...
\ No newline at end of file
index bf0fd41..9813f74 100644 (file)
@@ -1,2 +1,3 @@
 MSGCalcStart:\u958b\u59cb\uff01
-MSGDatabaseNotExist:\u697d\u66f2\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002\u81ea\u52d5\u7684\u306b\u4f5c\u6210\u3055\u308c\u307e\u3059\u2026\n\u6ce8\u610f\uff1a\u521d\u56de\u8d77\u52d5\u3067\u306f\u306a\u304f\u3001\u304b\u3064\u3001Jar\u30d5\u30a1\u30a4\u30eb\u3068\u540c\u3058\u968e\u5c64\u306b\"database.json\"\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u304c\u5b58\u5728\u3059\u308b\u306b\u3082\u95a2\u308f\u3089\u305a\n\u3053\u306e\u30dd\u30c3\u30d7\u30a2\u30c3\u30d7\u304c\u51fa\u305f\u5834\u5408\u3001\u958b\u767a\u8005\u307e\u3067\u3054\u4e00\u5831\u304f\u3060\u3055\u3044\u3002\nGithub URL: https://github.com/hizumiaoba/DelesteRandomSelector/issues
\ No newline at end of file
+MSGDatabaseNotExist:\u697d\u66f2\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002\u81ea\u52d5\u7684\u306b\u4f5c\u6210\u3055\u308c\u307e\u3059\u2026\n\u6ce8\u610f\uff1a\u521d\u56de\u8d77\u52d5\u3067\u306f\u306a\u304f\u3001\u304b\u3064\u3001Jar\u30d5\u30a1\u30a4\u30eb\u3068\u540c\u3058\u968e\u5c64\u306b\"database.json\"\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u304c\u5b58\u5728\u3059\u308b\u306b\u3082\u95a2\u308f\u3089\u305a\n\u3053\u306e\u30dd\u30c3\u30d7\u30a2\u30c3\u30d7\u304c\u51fa\u305f\u5834\u5408\u3001\u958b\u767a\u8005\u307e\u3067\u3054\u4e00\u5831\u304f\u3060\u3055\u3044\u3002\nGithub URL: https://github.com/hizumiaoba/DelesteRandomSelector/issues
+MSGAlbumTypeBeingCalculated:\u8a08\u7b97\u4e2d...
\ No newline at end of file
index 6d70ab5..9d73fca 100644 (file)
@@ -9,12 +9,13 @@ import java.util.ResourceBundle;
 public enum Messages {
 
        MSGCalcStart,
-       MSGDatabaseNotExist;
+       MSGDatabaseNotExist,
+       MSGAlbumTypeBeingCalculated;
 
        @Override
        public String toString() {
                try {
-                       return ResourceBundle.getBundle("com.ranfa.languages.List", Locale.getDefault()).getString(name());
+                       return ResourceBundle.getBundle("com.ranfa.languages.List", Locale.getDefault()).getString(this.name());
                } catch(Exception e) {
                        e.printStackTrace();
                        System.exit(-1);
index f3591a5..5f163e4 100644 (file)
@@ -24,7 +24,7 @@ public class LanguageTest {
                // asserts
                assertTrue(Messages.MSGCalcStart.toString().equals("開始!"));
                assertTrue(Messages.MSGDatabaseNotExist.toString().equals("楽曲データベースが見つかりませんでした。自動的に作成されます…\n注意:初回起動ではなく、かつ、Jarファイルと同じ階層に\"database.json\"というファイルが存在するにも関わらず\nこのポップアップが出た場合、開発者までご一報ください。\nGithub URL: https://github.com/hizumiaoba/DelesteRandomSelector/issues"));
-
+               assertTrue(Messages.MSGAlbumTypeBeingCalculated.toString().equals("計算中..."));
        }
 
        @Test
@@ -35,7 +35,7 @@ public class LanguageTest {
                // asserts
                assertTrue(Messages.MSGCalcStart.toString().equals("Start!"));
                assertTrue(Messages.MSGDatabaseNotExist.toString().equals("Music database does not exist.\nIt will be automatically created.\nATTENTION:There is the JSON file named \"database.json\" in the same directory which executable is contained and you see this pop up,\nPlease contact the Developer.\nGithub URL: https://github.com/hizumiaoba/DelesteRandomSelector/issues"));
-
+               assertTrue(Messages.MSGAlbumTypeBeingCalculated.toString().equals("Simulating..."));
        }
 
        @After