Исправил названия валют для Украины и баг с тем, что при выбранном евро везде писалось 'гривна'

This commit is contained in:
Ivan Murashov
2017-09-15 11:29:34 +03:00
parent 87b88cb99c
commit 6f76ea7b2a
9 changed files with 27 additions and 63 deletions

View File

@@ -1,51 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.dinect.checker"
android:versionCode="1"
android:versionName="1.0.1">
<uses-sdk
android:minSdkVersion="16"
android:targetSdkVersion="21"/>
<!-- The INTERNET permission is required for development. Specifically,
flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<!-- 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:icon="@mipmap/ic_launcher"
android:label="@string/app_name">
<activity
android:name=".MainActivity"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection"
android:hardwareAccelerated="true"
android:launchMode="singleTop"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.Black.NoTitleBar"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity
android:name=".zbar.CameraActivity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme"/>
<activity
android:name=".zxing.ScannerActivity"
android:theme="@style/AppTheme"/>
</application>
</manifest>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

View File

@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
// Serious constants
const String appName = "AutoBonus";
const String appName = "PIP";
const String url = 'https://pos-api-int.dinect.com/20130701/';
const String appToken = '9fec83cdca38c357e6b65dbb17514cdd36bf2a08';

View File

@@ -47,9 +47,9 @@ class MessageLookup extends MessageLookupByLibrary {
"nominative_ruble": MessageLookupByLibrary.simpleMessage("Рубль"),
"singular_ruble": MessageLookupByLibrary.simpleMessage("Рубля"),
"plural_ruble": MessageLookupByLibrary.simpleMessage("Рублей"),
"nominative_dollar": MessageLookupByLibrary.simpleMessage("Доллар"),
"singular_dollar": MessageLookupByLibrary.simpleMessage("Доллара"),
"plural_dollar": MessageLookupByLibrary.simpleMessage("Долларов"),
"nominative_dollar": MessageLookupByLibrary.simpleMessage("Доллар США"),
"singular_dollar": MessageLookupByLibrary.simpleMessage("Доллара США"),
"plural_dollar": MessageLookupByLibrary.simpleMessage("Долларов США"),
"nominative_hryvna": MessageLookupByLibrary.simpleMessage("Гривна"),
"singular_hryvna": MessageLookupByLibrary.simpleMessage("Гривны"),
"plural_hryvna": MessageLookupByLibrary.simpleMessage("Гривен"),

View File

@@ -25,10 +25,10 @@ class MessageLookup extends MessageLookupByLibrary {
"carry_purchase" : MessageLookupByLibrary.simpleMessage("Проведення покупки"),
"complite_activ" : MessageLookupByLibrary.simpleMessage("Завершити реєстрацію"),
"complite_purchase" : MessageLookupByLibrary.simpleMessage("Завершити купівлю"),
"confirm_purchase" : MessageLookupByLibrary.simpleMessage("Ви підтверджуєте покупку на %s гривень"),
"confirm_purchase" : MessageLookupByLibrary.simpleMessage("Ви підтверджуєте покупку на %s %s"),
"confirmation" : MessageLookupByLibrary.simpleMessage("Підтвердження"),
"no" : MessageLookupByLibrary.simpleMessage("Ні"),
"purchase_complite" : MessageLookupByLibrary.simpleMessage("Купівля на суму %s гривень проведена"),
"purchase_complite" : MessageLookupByLibrary.simpleMessage("Купівля на суму %s %s проведена"),
"registration" : MessageLookupByLibrary.simpleMessage("Реєстрація"),
"request_sent_wait_activ" : MessageLookupByLibrary.simpleMessage("Запит на активацію додатку відправлений, дочекайтеся підтвердження активації адміністратором"),
"reward" : MessageLookupByLibrary.simpleMessage("Винагорода"),
@@ -44,8 +44,20 @@ class MessageLookup extends MessageLookupByLibrary {
"logout" : MessageLookupByLibrary.simpleMessage("Вихід"),
"currency" : MessageLookupByLibrary.simpleMessage("Валюта"),
"locale" : MessageLookupByLibrary.simpleMessage("Мова"),
"ruble" : MessageLookupByLibrary.simpleMessage("Ruble"),
"dollar" : MessageLookupByLibrary.simpleMessage("Dollar"),
"hryvna" : MessageLookupByLibrary.simpleMessage("Hryvna")
"nominative_ruble": MessageLookupByLibrary.simpleMessage("Рубль"),
"singular_ruble": MessageLookupByLibrary.simpleMessage("Рубль"),
"plural_ruble": MessageLookupByLibrary.simpleMessage("Рубль"),
"nominative_dollar": MessageLookupByLibrary.simpleMessage("Доллар США"),
"singular_dollar": MessageLookupByLibrary.simpleMessage("Доллар США"),
"plural_dollar": MessageLookupByLibrary.simpleMessage("Доллар США"),
"nominative_hryvna": MessageLookupByLibrary.simpleMessage("Гривня"),
"singular_hryvna": MessageLookupByLibrary.simpleMessage("Гривня"),
"plural_hryvna": MessageLookupByLibrary.simpleMessage("Гривня"),
"nominative_tenge": MessageLookupByLibrary.simpleMessage("Тенге"),
"singular_tenge": MessageLookupByLibrary.simpleMessage("Тенге"),
"plural_tenge": MessageLookupByLibrary.simpleMessage("Тенге"),
"nominative_euro": MessageLookupByLibrary.simpleMessage("Євро"),
"singular_euro": MessageLookupByLibrary.simpleMessage("Євро"),
"plural_euro": MessageLookupByLibrary.simpleMessage("Євро")
};
}

View File

@@ -7,6 +7,7 @@ void main() {
runApp(new Checker());
}
// TODO: Запрашивать appName у платформы
class Checker extends StatelessWidget {
@override Widget build(BuildContext context) {
return new MaterialApp(

View File

@@ -48,6 +48,7 @@ class _CurrenciesState extends SettingsBaseState<CurrenciesScreen> {
@override
saveOption() async {
print(currencies[selectedItem]);
await helper.saveCurrency(currencies[selectedItem]);
}
}

View File

@@ -192,6 +192,7 @@ class PurchaseScreenState<T> extends BaseState<PurchaseScreen> {
onPurchaseClick() {
String val = _parseSum(controller.text);
helper.getCurrency().then((currency) {
print(currency.toString());
showDialog(context: context, child: new AlertDialog(
title: new Text(StringsLocalization.confirmation()),
content: new Text(StringsLocalization.confirmPurchase(val, currency)),

View File

@@ -51,9 +51,9 @@ class StringsLocalization {
plural = pluralHryvna();
break;
case 978:
nominative = nominativeHryvna();
singular = singularHryvna();
plural = pluralHryvna();
nominative = nominativeEuro();
singular = singularEuro();
plural = pluralEuro();
break;
case 398:
nominative = nominativeTenge();