Version 0.4.1.
0001-Fix-issue-with.patch unknown status 2
1 | - | From 52a2885e28309631edab2fe653c956600107394b Mon Sep 17 00:00:00 2001 | |
2 | - | From: Julien Lepiller <julien@lepiller.eu> | |
3 | - | Date: Sat, 25 Jun 2022 15:57:04 +0200 | |
4 | - | Subject: [PATCH 1/2] =?UTF-8?q?Fix=20issue=20with=20=E3=80=85?= | |
5 | - | MIME-Version: 1.0 | |
6 | - | Content-Type: text/plain; charset=UTF-8 | |
7 | - | Content-Transfer-Encoding: 8bit | |
8 | - | ||
9 | - | --- | |
10 | - | .idea/gradle.xml | 3 +-- | |
11 | - | .idea/runConfigurations.xml | 12 ---------- | |
12 | - | .../java/eu/lepiller/nani/result/Result.java | 23 +++++++++++++------ | |
13 | - | 3 files changed, 17 insertions(+), 21 deletions(-) | |
14 | - | delete mode 100644 .idea/runConfigurations.xml | |
15 | - | ||
16 | - | diff --git a/.idea/gradle.xml b/.idea/gradle.xml | |
17 | - | index 91df564..dffceeb 100644 | |
18 | - | --- a/.idea/gradle.xml | |
19 | - | +++ b/.idea/gradle.xml | |
20 | - | @@ -4,7 +4,7 @@ | |
21 | - | <component name="GradleSettings"> | |
22 | - | <option name="linkedExternalProjectsSettings"> | |
23 | - | <GradleProjectSettings> | |
24 | - | - <option name="testRunner" value="PLATFORM" /> | |
25 | - | + <option name="testRunner" value="GRADLE" /> | |
26 | - | <option name="distributionType" value="DEFAULT_WRAPPED" /> | |
27 | - | <option name="externalProjectPath" value="$PROJECT_DIR$" /> | |
28 | - | <option name="modules"> | |
29 | - | @@ -14,7 +14,6 @@ | |
30 | - | <option value="$PROJECT_DIR$/rubytextview" /> | |
31 | - | </set> | |
32 | - | </option> | |
33 | - | - <option name="resolveModulePerSourceSet" value="false" /> | |
34 | - | </GradleProjectSettings> | |
35 | - | </option> | |
36 | - | </component> | |
37 | - | diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml | |
38 | - | deleted file mode 100644 | |
39 | - | index 7f68460..0000000 | |
40 | - | --- a/.idea/runConfigurations.xml | |
41 | - | +++ /dev/null | |
42 | - | @@ -1,12 +0,0 @@ | |
43 | - | -<?xml version="1.0" encoding="UTF-8"?> | |
44 | - | -<project version="4"> | |
45 | - | - <component name="RunConfigurationProducerService"> | |
46 | - | - <option name="ignoredProducers"> | |
47 | - | - <set> | |
48 | - | - <option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" /> | |
49 | - | - <option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" /> | |
50 | - | - <option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" /> | |
51 | - | - </set> | |
52 | - | - </option> | |
53 | - | - </component> | |
54 | - | -</project> | |
55 | - | \ No newline at end of file | |
56 | - | diff --git a/app/src/main/java/eu/lepiller/nani/result/Result.java b/app/src/main/java/eu/lepiller/nani/result/Result.java | |
57 | - | index ed1cfb5..ff7e87c 100644 | |
58 | - | --- a/app/src/main/java/eu/lepiller/nani/result/Result.java | |
59 | - | +++ b/app/src/main/java/eu/lepiller/nani/result/Result.java | |
60 | - | @@ -1,5 +1,6 @@ | |
61 | - | package eu.lepiller.nani.result; | |
62 | - | ||
63 | - | +import android.os.Build; | |
64 | - | import android.util.Log; | |
65 | - | ||
66 | - | import com.moji4j.MojiConverter; | |
67 | - | @@ -9,8 +10,7 @@ import java.util.List; | |
68 | - | import java.util.regex.Matcher; | |
69 | - | import java.util.regex.Pattern; | |
70 | - | ||
71 | - | -import static java.lang.Character.UnicodeBlock.CJK_UNIFIED_IDEOGRAPHS; | |
72 | - | -import static java.lang.Character.UnicodeBlock.KATAKANA; | |
73 | - | +import static java.lang.Character.UnicodeBlock.*; | |
74 | - | ||
75 | - | public class Result { | |
76 | - | public static class Source { | |
77 | - | @@ -133,6 +133,16 @@ public class Result { | |
78 | - | return null; | |
79 | - | } | |
80 | - | ||
81 | - | + private static boolean isKanji(char c) { | |
82 | - | + Character.UnicodeBlock b = of(c); | |
83 | - | + return b == CJK_UNIFIED_IDEOGRAPHS || | |
84 | - | + b == CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A || | |
85 | - | + b == CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B || | |
86 | - | + (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT && b == CJK_UNIFIED_IDEOGRAPHS_EXTENSION_C) || | |
87 | - | + (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT && b == CJK_UNIFIED_IDEOGRAPHS_EXTENSION_D) || | |
88 | - | + b == CJK_SYMBOLS_AND_PUNCTUATION; | |
89 | - | + } | |
90 | - | + | |
91 | - | public String getKanjiFurigana() { | |
92 | - | String txt = getKanji(); | |
93 | - | String reading = getReading(); | |
94 | - | @@ -142,12 +152,12 @@ public class Result { | |
95 | - | ArrayList<String> portions = new ArrayList<>(); | |
96 | - | ||
97 | - | StringBuilder current = new StringBuilder(); | |
98 | - | - Character.UnicodeBlock b = CJK_UNIFIED_IDEOGRAPHS; | |
99 | - | + boolean currentBlockIsKanji = true; | |
100 | - | ||
101 | - | MojiConverter converter = new MojiConverter(); | |
102 | - | for(int i=0; i<txt.length(); i++) { | |
103 | - | - Character.UnicodeBlock b2 = Character.UnicodeBlock.of(txt.charAt(i)); | |
104 | - | - if(b == b2) { | |
105 | - | + boolean currentCharIsKanji = isKanji(txt.charAt(i)); | |
106 | - | + if(currentBlockIsKanji == currentCharIsKanji) { | |
107 | - | // if the headwork contains katakana, convert it to hiragana to match pronunciation | |
108 | - | // better. | |
109 | - | current.append(txt.charAt(i)); | |
110 | - | @@ -158,8 +168,7 @@ public class Result { | |
111 | - | current = new StringBuilder(); | |
112 | - | current.append(txt.charAt(i)); | |
113 | - | } | |
114 | - | - | |
115 | - | - b = b2; | |
116 | - | + currentBlockIsKanji = currentCharIsKanji; | |
117 | - | } | |
118 | - | String str = current.toString(); | |
119 | - | if(!str.isEmpty()) | |
120 | - | -- | |
121 | - | 2.36.1 | |
122 | - |
0002-Revert-Fix-issue-with.patch unknown status 2
1 | - | From 578597e322002ae1d9fb2cd649c1d57950c8d5e2 Mon Sep 17 00:00:00 2001 | |
2 | - | From: Julien Lepiller <julien@lepiller.eu> | |
3 | - | Date: Sat, 25 Jun 2022 16:06:16 +0200 | |
4 | - | Subject: [PATCH 2/2] =?UTF-8?q?Revert=20"Fix=20issue=20with=20=E3=80=85"?= | |
5 | - | MIME-Version: 1.0 | |
6 | - | Content-Type: text/plain; charset=UTF-8 | |
7 | - | Content-Transfer-Encoding: 8bit | |
8 | - | ||
9 | - | This reverts commit 52a2885e28309631edab2fe653c956600107394b. | |
10 | - | --- | |
11 | - | .idea/gradle.xml | 3 ++- | |
12 | - | .idea/runConfigurations.xml | 12 ++++++++++ | |
13 | - | .../java/eu/lepiller/nani/result/Result.java | 23 ++++++------------- | |
14 | - | 3 files changed, 21 insertions(+), 17 deletions(-) | |
15 | - | create mode 100644 .idea/runConfigurations.xml | |
16 | - | ||
17 | - | diff --git a/.idea/gradle.xml b/.idea/gradle.xml | |
18 | - | index dffceeb..91df564 100644 | |
19 | - | --- a/.idea/gradle.xml | |
20 | - | +++ b/.idea/gradle.xml | |
21 | - | @@ -4,7 +4,7 @@ | |
22 | - | <component name="GradleSettings"> | |
23 | - | <option name="linkedExternalProjectsSettings"> | |
24 | - | <GradleProjectSettings> | |
25 | - | - <option name="testRunner" value="GRADLE" /> | |
26 | - | + <option name="testRunner" value="PLATFORM" /> | |
27 | - | <option name="distributionType" value="DEFAULT_WRAPPED" /> | |
28 | - | <option name="externalProjectPath" value="$PROJECT_DIR$" /> | |
29 | - | <option name="modules"> | |
30 | - | @@ -14,6 +14,7 @@ | |
31 | - | <option value="$PROJECT_DIR$/rubytextview" /> | |
32 | - | </set> | |
33 | - | </option> | |
34 | - | + <option name="resolveModulePerSourceSet" value="false" /> | |
35 | - | </GradleProjectSettings> | |
36 | - | </option> | |
37 | - | </component> | |
38 | - | diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml | |
39 | - | new file mode 100644 | |
40 | - | index 0000000..7f68460 | |
41 | - | --- /dev/null | |
42 | - | +++ b/.idea/runConfigurations.xml | |
43 | - | @@ -0,0 +1,12 @@ | |
44 | - | +<?xml version="1.0" encoding="UTF-8"?> | |
45 | - | +<project version="4"> | |
46 | - | + <component name="RunConfigurationProducerService"> | |
47 | - | + <option name="ignoredProducers"> | |
48 | - | + <set> | |
49 | - | + <option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" /> | |
50 | - | + <option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" /> | |
51 | - | + <option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" /> | |
52 | - | + </set> | |
53 | - | + </option> | |
54 | - | + </component> | |
55 | - | +</project> | |
56 | - | \ No newline at end of file | |
57 | - | diff --git a/app/src/main/java/eu/lepiller/nani/result/Result.java b/app/src/main/java/eu/lepiller/nani/result/Result.java | |
58 | - | index ff7e87c..ed1cfb5 100644 | |
59 | - | --- a/app/src/main/java/eu/lepiller/nani/result/Result.java | |
60 | - | +++ b/app/src/main/java/eu/lepiller/nani/result/Result.java | |
61 | - | @@ -1,6 +1,5 @@ | |
62 | - | package eu.lepiller.nani.result; | |
63 | - | ||
64 | - | -import android.os.Build; | |
65 | - | import android.util.Log; | |
66 | - | ||
67 | - | import com.moji4j.MojiConverter; | |
68 | - | @@ -10,7 +9,8 @@ import java.util.List; | |
69 | - | import java.util.regex.Matcher; | |
70 | - | import java.util.regex.Pattern; | |
71 | - | ||
72 | - | -import static java.lang.Character.UnicodeBlock.*; | |
73 | - | +import static java.lang.Character.UnicodeBlock.CJK_UNIFIED_IDEOGRAPHS; | |
74 | - | +import static java.lang.Character.UnicodeBlock.KATAKANA; | |
75 | - | ||
76 | - | public class Result { | |
77 | - | public static class Source { | |
78 | - | @@ -133,16 +133,6 @@ public class Result { | |
79 | - | return null; | |
80 | - | } | |
81 | - | ||
82 | - | - private static boolean isKanji(char c) { | |
83 | - | - Character.UnicodeBlock b = of(c); | |
84 | - | - return b == CJK_UNIFIED_IDEOGRAPHS || | |
85 | - | - b == CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A || | |
86 | - | - b == CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B || | |
87 | - | - (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT && b == CJK_UNIFIED_IDEOGRAPHS_EXTENSION_C) || | |
88 | - | - (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT && b == CJK_UNIFIED_IDEOGRAPHS_EXTENSION_D) || | |
89 | - | - b == CJK_SYMBOLS_AND_PUNCTUATION; | |
90 | - | - } | |
91 | - | - | |
92 | - | public String getKanjiFurigana() { | |
93 | - | String txt = getKanji(); | |
94 | - | String reading = getReading(); | |
95 | - | @@ -152,12 +142,12 @@ public class Result { | |
96 | - | ArrayList<String> portions = new ArrayList<>(); | |
97 | - | ||
98 | - | StringBuilder current = new StringBuilder(); | |
99 | - | - boolean currentBlockIsKanji = true; | |
100 | - | + Character.UnicodeBlock b = CJK_UNIFIED_IDEOGRAPHS; | |
101 | - | ||
102 | - | MojiConverter converter = new MojiConverter(); | |
103 | - | for(int i=0; i<txt.length(); i++) { | |
104 | - | - boolean currentCharIsKanji = isKanji(txt.charAt(i)); | |
105 | - | - if(currentBlockIsKanji == currentCharIsKanji) { | |
106 | - | + Character.UnicodeBlock b2 = Character.UnicodeBlock.of(txt.charAt(i)); | |
107 | - | + if(b == b2) { | |
108 | - | // if the headwork contains katakana, convert it to hiragana to match pronunciation | |
109 | - | // better. | |
110 | - | current.append(txt.charAt(i)); | |
111 | - | @@ -168,7 +158,8 @@ public class Result { | |
112 | - | current = new StringBuilder(); | |
113 | - | current.append(txt.charAt(i)); | |
114 | - | } | |
115 | - | - currentBlockIsKanji = currentCharIsKanji; | |
116 | - | + | |
117 | - | + b = b2; | |
118 | - | } | |
119 | - | String str = current.toString(); | |
120 | - | if(!str.isEmpty()) | |
121 | - | -- | |
122 | - | 2.36.1 | |
123 | - |
CHANGELOG.md
7 | 7 | Here is a list of changes that are not yet part of a release, but that will | |
8 | 8 | appear in next release. | |
9 | 9 | ||
10 | + | Changes in 0.4.1 | |
11 | + | ---------------- | |
12 | + | ||
13 | + | This is mostly a maintenance release, with some code changes to make it more | |
14 | + | maintainable and resolve automatic warnings. | |
15 | + | ||
16 | + | ### Features | |
17 | + | ||
18 | + | * New pitch accent display styles. You can now see the pitch accent information | |
19 | + | as before in a box next to the head word, as a pitch diagram below the head | |
20 | + | word, or as a contour around the hiragana pronunciation. | |
21 | + | ||
10 | 22 | Changes in 0.4.0 | |
11 | 23 | ---------------- | |
12 | 24 |
app/build.gradle
6 | 6 | applicationId "eu.lepiller.nani" | |
7 | 7 | minSdkVersion 15 | |
8 | 8 | targetSdkVersion 33 | |
9 | - | versionCode 12 | |
10 | - | versionName "0.4.0" | |
9 | + | versionCode 13 | |
10 | + | versionName "0.4.1" | |
11 | 11 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | |
12 | 12 | } | |
13 | 13 | buildTypes { |