Skip to content

Commit

Permalink
Merge pull request #23 from aeri/wip
Browse files Browse the repository at this point in the history
Ability to go back & Full app translation
  • Loading branch information
NAVAL authored Oct 20, 2020
2 parents e7a13b7 + 6a2da75 commit 286e557
Show file tree
Hide file tree
Showing 17 changed files with 321 additions and 184 deletions.
5 changes: 2 additions & 3 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,16 @@
to allow setting breakpoints, to provide hot reload, etc.
<uses-permission android:name="android.permission.INTERNET"/>
-->

-->
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
calls FlutterMain.startInitialization(this); in its onCreate method.
In most cases you can leave this as-is, but you if you want to provide
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
<application
android:name="io.flutter.app.FlutterApplication"
android:label="Nihonoari"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
Expand Down
4 changes: 4 additions & 0 deletions android/app/src/main/res/values-ja/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">にほのあり</string>
</resources>
8 changes: 8 additions & 0 deletions android/app/src/main/res/values-ja/styles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
Flutter draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
</resources>
4 changes: 4 additions & 0 deletions android/app/src/main/res/values-ru/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Нихоноари</string>
</resources>
8 changes: 8 additions & 0 deletions android/app/src/main/res/values-ru/styles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
Flutter draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
</resources>
4 changes: 4 additions & 0 deletions android/app/src/main/res/values-uk/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Ніхоноарі</string>
</resources>
8 changes: 8 additions & 0 deletions android/app/src/main/res/values-uk/styles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
Flutter draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
</resources>
4 changes: 4 additions & 0 deletions android/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Nihonoari</string>
</resources>
6 changes: 5 additions & 1 deletion i18n/be.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"main_licenses": "ЛІЦЭНЗІІ",
"main_hset": "Выбарка Хіраганы",
"main_kset": "Выбарка Катаканы",
"main_hiragana": "Уключыць склады Хіраганы",
"main_katakana": "Уключыць склады Катаканы",
"main_select": "Выбраць...",
Expand All @@ -10,5 +12,7 @@
"quiz_failed": "Няправільна",
"quiz_rate": "Адсотак поспеху",
"quiz_enter": "Увядзіце рамаджы",
"quiz_correct": "Правільны адказ"
"quiz_correct": "Правільны адказ",
"quiz_stoptit" : "Спыніць тэст",
"quiz_stopmes" : "Вярнуцца ў галоўнае меню?"
}
8 changes: 6 additions & 2 deletions i18n/en.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"main_licenses": "LICENSES",
"main_hset": "Hiragana set",
"main_kset": "Katakana set",
"main_hiragana" : "Include Hiragana syllabary",
"main_katakana" : "Include Katakana syllabary",
"main_select": "Select one",
Expand All @@ -9,6 +11,8 @@
"quiz_passed": "Passed",
"quiz_failed": "Failed",
"quiz_rate": "Success rate",
"quiz_enter": "Enter rōmaji",
"quiz_correct": "Correct answer"
"quiz_enter": "Input rōmaji",
"quiz_correct": "Correct answer",
"quiz_stoptit" : "Stop quiz",
"quiz_stopmes" : "Return to the main menu?"
}
8 changes: 6 additions & 2 deletions i18n/es.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
{
"main_licenses": "LICENCIAS",
"main_hset": "Conjunto Hiragana",
"main_kset": "Conjunto Katakana",
"main_hiragana" : "Incluir silabario Hiragana",
"main_katakana" : "Incluir silabario Katakana",
"main_select": "Selecciona",
"main_select": "Elige",
"main_start": "Inciar",
"quiz_stats": "Estadísticas",
"quiz_total": "Total",
"quiz_passed": "Aciertos",
"quiz_failed": "Fallos",
"quiz_rate": "Tasa de acierto",
"quiz_enter": "Escribe rōmaji",
"quiz_correct": "Respuesta correcta"
"quiz_correct": "Respuesta correcta",
"quiz_stoptit" : "Detener prueba",
"quiz_stopmes" : "¿Volver al menú principal?"
}
6 changes: 5 additions & 1 deletion i18n/fr.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"main_licenses": "LICENCES",
"main_hset": "Hiragana set",
"main_kset": "Katakana set",
"main_hiragana" : "Incorporer syllabaire Hiragana",
"main_katakana" : "Incorporer syllabaire Katakana",
"main_select": "Choisis",
Expand All @@ -10,5 +12,7 @@
"quiz_failed": "Ratés",
"quiz_rate": "Taux de succès",
"quiz_enter": "Écris rōmaji",
"quiz_correct": "Réponse correcte"
"quiz_correct": "Réponse correcte",
"quiz_stoptit" : "Arrêter le test",
"quiz_stopmes" : "Retour au menu principal?"
}
6 changes: 5 additions & 1 deletion i18n/ru.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"main_licenses": "ЛИЦЕНЗИИ",
"main_hset": "Выборка Хираганы",
"main_kset": "Выборка Катаканы",
"main_hiragana" : "Включить слоги Хираганы",
"main_katakana" : "Включить слоги Катаканы",
"main_select": "Выберите что-то",
Expand All @@ -10,5 +12,7 @@
"quiz_failed": "Провалено",
"quiz_rate": "Процент успеха",
"quiz_enter": "Введите ромадзи",
"quiz_correct": "Верный ответ"
"quiz_correct": "Верный ответ",
"quiz_stoptit" : "Остановить тест",
"quiz_stopmes" : "Вернуться в главное меню?"
}
6 changes: 5 additions & 1 deletion i18n/uk.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"main_licenses": "ЛІЦЕНЗІЇ",
"main_hset": "Вибірка Хірагани",
"main_kset": "Вибірка Катакани",
"main_hiragana" : "Включити склади Хіраґани",
"main_katakana" : "Включити склади Катакани",
"main_select": "Виберіть щось",
Expand All @@ -10,5 +12,7 @@
"quiz_failed": "Помилкових",
"quiz_rate": "Відсоток успіху",
"quiz_enter": "Введіть ромадзі",
"quiz_correct": "Правильна відповідь"
"quiz_correct": "Правильна відповідь",
"quiz_stoptit" : "Зупинити тест",
"quiz_stopmes" : "Повернутися в головне меню?"
}
54 changes: 45 additions & 9 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class _hiraDialogState extends State<hiraDialog> {
Widget build(BuildContext context) {
return AlertDialog(
title: Text(
'Hiragana set',
AppLocalizations.of(context).translate('main_hset'),
style: TextStyle(
color: Colors.white,
),
Expand Down Expand Up @@ -131,7 +131,7 @@ class _kataDialogState extends State<kataDialog> {
return AlertDialog(
backgroundColor: Colors.black,
title: Text(
'Katakana set',
AppLocalizations.of(context).translate('main_kset'),
style: TextStyle(
color: Colors.white,
),
Expand Down Expand Up @@ -324,9 +324,27 @@ class _State extends State<MyApp> {
color: Colors.white,
),
),
secondary: new Icon(
Icons.font_download,
color: Colors.white,
secondary: new Container(
decoration: new BoxDecoration(
color: Colors.white,
borderRadius: new BorderRadius.circular(4.0),
),
padding: EdgeInsets.symmetric(vertical: 1, horizontal: 1),
//padding: new EdgeInsets.all(4.0),
height: 25.0,
width: 25.0,
child: Align(
alignment: Alignment.center,
child: new Text(
"あ",
style: new TextStyle(
fontSize: 23.0,
fontFamily: "AppleTPB",
fontStyle: FontStyle.normal,
color: Colors.black,
),
),
),
),
activeColor: Colors.red,
),
Expand Down Expand Up @@ -362,9 +380,27 @@ class _State extends State<MyApp> {
color: Colors.white,
),
),
secondary: new Icon(
Icons.font_download,
color: Colors.white,
secondary: new Container(
decoration: new BoxDecoration(
color: Colors.white,
borderRadius: new BorderRadius.circular(4.0),
),
padding: EdgeInsets.symmetric(vertical: 1, horizontal: 1),
//padding: new EdgeInsets.all(4.0),
height: 25.0,
width: 25.0,
child: Align(
alignment: Alignment.center,
child: new Text(
"ア",
style: new TextStyle(
fontSize: 23.0,
fontFamily: "AppleTPB",
fontStyle: FontStyle.normal,
color: Colors.black,
),
),
),
),
activeColor: Colors.red,
),
Expand All @@ -381,7 +417,7 @@ class _State extends State<MyApp> {
onPressed: _isButtonDisabled
? null
: () {
Navigator.pushReplacement(
Navigator.push(
context,
MaterialPageRoute(
builder: (BuildContext context) =>
Expand Down
Loading

0 comments on commit 286e557

Please sign in to comment.