modpack_localizer 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -1
- data/lib/modpack_localizer/jar/performer.rb +1 -1
- data/lib/modpack_localizer/jar/reader.rb +10 -3
- data/lib/modpack_localizer/util/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d4d484b716a6af6fede9a60f37667a7662cf43a940552dcda8301f1392d0d8a6
|
|
4
|
+
data.tar.gz: 0ec257aa9d37743bac0e1c50b7f83ee402991052abfe2e33dc42cabb7af81463
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a1ec5c5c26591217a45930c666d7cdb1a2e48b6431d540ef7035fe06b537caaaec45f5722ce552e8bf0a36dded78129fdff6adbf059fe4d91114765e626fb83c
|
|
7
|
+
data.tar.gz: cfad09a89b0d982f139e6e7845d56253c4ee9732678b4f8e073392a2b006ccf027d182a1d1df5a6322ffafa89ace0c7ab6f8970e30ea50ac3cfe316c5fffe1c8
|
data/CHANGELOG.md
CHANGED
|
@@ -132,7 +132,7 @@ module ModpackLocalizer
|
|
|
132
132
|
return unless @loggable
|
|
133
133
|
|
|
134
134
|
@progress_bar.finish
|
|
135
|
-
puts already_has_translated_file_message(lang_data)
|
|
135
|
+
lang_data.message ? puts(lang_data.message) : already_has_translated_file_message(lang_data)
|
|
136
136
|
end
|
|
137
137
|
|
|
138
138
|
# 既に翻訳済みのファイルが存在する旨のメッセージを出力する
|
|
@@ -17,9 +17,10 @@ module ModpackLocalizer
|
|
|
17
17
|
# @param [String] file_name ファイル名
|
|
18
18
|
# @param [String] locale_code ロケールコード
|
|
19
19
|
# @param [String] mod_name mod名
|
|
20
|
+
# @param [String] message 表示するメッセージ
|
|
20
21
|
# @return [LangData]
|
|
21
22
|
LangData = Struct.new(
|
|
22
|
-
:need_translation, :json, :file_name, :locale_code, :mod_name
|
|
23
|
+
:need_translation, :json, :file_name, :locale_code, :mod_name, :message
|
|
23
24
|
)
|
|
24
25
|
|
|
25
26
|
# locale_codeが渡された場合、languageとcountry_nameは不要
|
|
@@ -48,15 +49,21 @@ module ModpackLocalizer
|
|
|
48
49
|
target_lang_file = find_lang_json(jar, @locale_code)
|
|
49
50
|
if target_lang_file
|
|
50
51
|
return LangData.new(
|
|
51
|
-
false, {}, target_lang_file, nil, extract_mod_name(target_lang_file)
|
|
52
|
+
false, {}, target_lang_file, nil, extract_mod_name(target_lang_file), nil
|
|
52
53
|
)
|
|
53
54
|
end
|
|
54
55
|
|
|
55
56
|
lang_file = find_lang_json(jar, "en_us")
|
|
57
|
+
unless lang_file
|
|
58
|
+
return LangData.new(
|
|
59
|
+
false, {}, lang_file, nil, nil, "Language files not found from #{extract_file_name(jar)}"
|
|
60
|
+
)
|
|
61
|
+
end
|
|
62
|
+
|
|
56
63
|
raw_json = JSON.parse(lang_file.get_input_stream.read)
|
|
57
64
|
|
|
58
65
|
LangData.new(
|
|
59
|
-
true, except_comment(raw_json), lang_file, @locale_code, extract_mod_name(lang_file)
|
|
66
|
+
true, except_comment(raw_json), lang_file, @locale_code, extract_mod_name(lang_file), nil
|
|
60
67
|
)
|
|
61
68
|
end
|
|
62
69
|
end
|