diff --git a/android/app/src/autobonus/res/values-ru/strings.xml b/android/app/src/autobonus/res/values-ru/strings.xml
deleted file mode 100644
index f4d6be5..0000000
--- a/android/app/src/autobonus/res/values-ru/strings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
- AutoBonus
-
diff --git a/android/app/src/autobonus/res/values-ua/strings.xml b/android/app/src/autobonus/res/values-ua/strings.xml
deleted file mode 100644
index f4d6be5..0000000
--- a/android/app/src/autobonus/res/values-ua/strings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
- AutoBonus
-
diff --git a/android/app/src/crypto/res/values-ru/strings.xml b/android/app/src/crypto/res/values-ru/strings.xml
deleted file mode 100644
index ee90d67..0000000
--- a/android/app/src/crypto/res/values-ru/strings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
- Dinect Crypto
-
diff --git a/android/app/src/crypto/res/values-ua/strings.xml b/android/app/src/crypto/res/values-ua/strings.xml
deleted file mode 100644
index ee90d67..0000000
--- a/android/app/src/crypto/res/values-ua/strings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
- Dinect Crypto
-
diff --git a/android/app/src/dinect_INT/res/values-ru/strings.xml b/android/app/src/dinect_INT/res/values-ru/strings.xml
deleted file mode 100644
index 907af77..0000000
--- a/android/app/src/dinect_INT/res/values-ru/strings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
- Dinect (INT)
-
diff --git a/android/app/src/dinect_INT/res/values-ua/strings.xml b/android/app/src/dinect_INT/res/values-ua/strings.xml
deleted file mode 100644
index 907af77..0000000
--- a/android/app/src/dinect_INT/res/values-ua/strings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
- Dinect (INT)
-
diff --git a/android/app/src/dinect_OTE/res/values-ru/strings.xml b/android/app/src/dinect_OTE/res/values-ru/strings.xml
deleted file mode 100644
index 054dd0e..0000000
--- a/android/app/src/dinect_OTE/res/values-ru/strings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
- Dinect (OTE)
-
diff --git a/android/app/src/dinect_OTE/res/values-ua/strings.xml b/android/app/src/dinect_OTE/res/values-ua/strings.xml
deleted file mode 100644
index 054dd0e..0000000
--- a/android/app/src/dinect_OTE/res/values-ua/strings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
- Dinect (OTE)
-
diff --git a/android/app/src/dinect_STAGING/res/values-ru/strings.xml b/android/app/src/dinect_STAGING/res/values-ru/strings.xml
deleted file mode 100644
index 466ff48..0000000
--- a/android/app/src/dinect_STAGING/res/values-ru/strings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
- Dinect (STAGING)
-
diff --git a/android/app/src/dinect_STAGING/res/values-ua/strings.xml b/android/app/src/dinect_STAGING/res/values-ua/strings.xml
deleted file mode 100644
index 466ff48..0000000
--- a/android/app/src/dinect_STAGING/res/values-ua/strings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
- Dinect (STAGING)
-
diff --git a/android/app/src/dinect_TESTING/res/values-ru/strings.xml b/android/app/src/dinect_TESTING/res/values-ru/strings.xml
deleted file mode 100644
index 5a838f9..0000000
--- a/android/app/src/dinect_TESTING/res/values-ru/strings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
- Dinect (TESTING)
-
diff --git a/android/app/src/dinect_TESTING/res/values-ua/strings.xml b/android/app/src/dinect_TESTING/res/values-ua/strings.xml
deleted file mode 100644
index 5a838f9..0000000
--- a/android/app/src/dinect_TESTING/res/values-ua/strings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
- Dinect (TESTING)
-
diff --git a/android/app/src/main/java/com/dinect/checker/AbstractScannerActivity.java b/android/app/src/main/java/com/dinect/checker/AbstractScannerActivity.java
index d85f8c8..b616727 100644
--- a/android/app/src/main/java/com/dinect/checker/AbstractScannerActivity.java
+++ b/android/app/src/main/java/com/dinect/checker/AbstractScannerActivity.java
@@ -154,10 +154,10 @@ public abstract class AbstractScannerActivity extends AppCompatActivity impleme
EditText manualInput = (EditText) findViewById(R.id.manual_input);
switch (searchType) {
case CARD:
- manualInput.setHint(getResources().getString(R.string.enter_manual));
+ manualInput.setHint(getIntent().getStringExtra("enter_manual"));
break;
case PHONE_NUMBER:
- manualInput.setHint(getResources().getString(R.string.enter_phone));
+ manualInput.setHint(getIntent().getStringExtra("enter_phone"));
break;
}
}
@@ -268,9 +268,9 @@ public abstract class AbstractScannerActivity extends AppCompatActivity impleme
runOnUiThread(new Runnable() {
@Override
public void run() {
- String message = String.format(getString(R.string.identifier_not_found), searchString)
+ String message = String.format(getIntent().getStringExtra("identifier_not_found"), searchString)
+ ".\n"
- + String.format(getString(R.string.error_contact_support), BuildConfig.supportPhone);
+ + String.format(getIntent().getStringExtra("error_contact_support"), BuildConfig.supportPhone);
Toast.makeText(AbstractScannerActivity.this, message, Toast.LENGTH_SHORT).show();
}
});
@@ -284,9 +284,19 @@ public abstract class AbstractScannerActivity extends AppCompatActivity impleme
@Override
public boolean onPrepareOptionsMenu(Menu menu) {
- menu.findItem(R.id.settings).setIcon(getResources().getDrawable(R.drawable.settings));
- menu.findItem(R.id.faq).setIcon(getResources().getDrawable(R.drawable.help));
- menu.findItem(R.id.exit).setIcon(getResources().getDrawable(R.drawable.exit));
+
+ MenuItem settings = menu.findItem(R.id.settings);
+ settings.setIcon(getResources().getDrawable(R.drawable.settings));
+ settings.setTitle(getIntent().getStringExtra("settings"));
+
+ MenuItem faq = menu.findItem(R.id.faq);
+ faq.setIcon(getResources().getDrawable(R.drawable.help));
+ faq.setTitle(getIntent().getStringExtra("faq"));
+
+ MenuItem exit = menu.findItem(R.id.exit);
+ exit.setIcon(getResources().getDrawable(R.drawable.exit));
+ exit.setTitle(getIntent().getStringExtra("exit"));
+
return super.onPrepareOptionsMenu(menu);
}
diff --git a/android/app/src/main/java/com/dinect/checker/MainActivity.java b/android/app/src/main/java/com/dinect/checker/MainActivity.java
index d1a968d..7b857d0 100644
--- a/android/app/src/main/java/com/dinect/checker/MainActivity.java
+++ b/android/app/src/main/java/com/dinect/checker/MainActivity.java
@@ -22,10 +22,11 @@ public class MainActivity extends FlutterActivity {
private static final int START_SCANNER_REQUEST_CODE = 2017;
private static final String FLUTTER_CHANNEL_NAME = "com.dinect.checker/instance_id";
- static final String PREF_API_URL = "prefs_api_token";
- static final String PREF_APP_TOKEN = "pres_app_token";
- static final String PREF_POS_TOKEN = "pref_pos_token";
- static final String PREF_APP_BAR_COLOR = "pref_app_bar_color";
+ static final String PREF_API_URL = "url";
+ static final String PREF_APP_TOKEN = "appToken";
+ static final String PREF_POS_TOKEN = "token";
+ static final String PREF_APP_BAR_COLOR = "color";
+
static final String SCANNER_BACKEND_KEY = "scanner_backend_idx";
static final int ZXING = 0;
@@ -66,7 +67,6 @@ public class MainActivity extends FlutterActivity {
break;
case "startScanner":
mScannerArgs = call.arguments();
- System.out.println(mScannerArgs.toString());
startScannerActivity();
break;
case "isOnline":
@@ -128,10 +128,16 @@ public class MainActivity extends FlutterActivity {
private void startScannerActivity() {
final int idx = getSharedPreferences("scanner", Context.MODE_PRIVATE).getInt(SCANNER_BACKEND_KEY, 0);
Intent cameraIntent = new Intent(MainActivity.this, SCANNER_BACKEND[idx]);
- cameraIntent.putExtra(PREF_API_URL, (String) mScannerArgs.get("url"));
- cameraIntent.putExtra(PREF_APP_TOKEN, (String) mScannerArgs.get("appToken"));
- cameraIntent.putExtra(PREF_POS_TOKEN, (String) mScannerArgs.get("token"));
- cameraIntent.putExtra(PREF_APP_BAR_COLOR, (Long) mScannerArgs.get("color"));
+
+ for (Object key : mScannerArgs.keySet()) {
+ Log.d("kifio", "k: " + key + "; v: " + mScannerArgs.get(key).toString());
+ if (key.equals("color")) {
+ cameraIntent.putExtra((String) key, Long.parseLong((String) mScannerArgs.get(key)));
+ } else {
+ cameraIntent.putExtra((String) key, (String) mScannerArgs.get(key));
+ }
+ }
+
setLocale((String) mScannerArgs.get("locale"));
startActivityForResult(cameraIntent, START_SCANNER_REQUEST_CODE);
}
@@ -206,4 +212,8 @@ public class MainActivity extends FlutterActivity {
public void getAppToken() {
}
+
+ public void setStrings() {
+
+ }
}
diff --git a/android/app/src/main/res/layout/v_custom_toolbar.xml b/android/app/src/main/res/layout/v_custom_toolbar.xml
index ce083dc..14ea12a 100644
--- a/android/app/src/main/res/layout/v_custom_toolbar.xml
+++ b/android/app/src/main/res/layout/v_custom_toolbar.xml
@@ -14,18 +14,16 @@
android:id="@+id/cardPhoneButton"
android:layout_width="wrap_content"
android:layout_marginRight="12dp"
- android:layout_height="wrap_content"
- />
+ android:layout_height="wrap_content" />
+ android:textColorHint="@android:color/white" />
diff --git a/android/app/src/main/res/menu/menu.xml b/android/app/src/main/res/menu/menu.xml
index 6562c33..5d4235a 100644
--- a/android/app/src/main/res/menu/menu.xml
+++ b/android/app/src/main/res/menu/menu.xml
@@ -12,15 +12,15 @@
diff --git a/android/app/src/main/res/values-ru/strings.xml b/android/app/src/main/res/values-ru/strings.xml
deleted file mode 100644
index 4f5a97b..0000000
--- a/android/app/src/main/res/values-ru/strings.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
- Dinect
- Сканер карты
- Сканировать
- Справка
- Закрыть приложение
- Настройки
- "Идентификатор %s не найден"
- Введите номер карты
- Телефон 79XXXXXXXXX
- Можете воспользоваться ручным вводом или позвонить на номер:%s
-
diff --git a/android/app/src/main/res/values-ua/strings.xml b/android/app/src/main/res/values-ua/strings.xml
deleted file mode 100644
index 805694c..0000000
--- a/android/app/src/main/res/values-ua/strings.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
- Dinect
- Сканер карти
- Сканувати
- Допомога
- Закрыть приложение
- Налаштування
- "Ідентифікатор %s не знайден"
- Введіть штрихкод вручну
- Телефон 79XXXXXXXXX
- Можете скористатися ручним введенням або зателефонувати на номер:\n%s
-
diff --git a/android/app/src/main/res/values/strings.xml b/android/app/src/main/res/values/strings.xml
index 0b7e185..9aad28f 100644
--- a/android/app/src/main/res/values/strings.xml
+++ b/android/app/src/main/res/values/strings.xml
@@ -1,12 +1,3 @@
Dinect
- Card Scanner
- Scan
- Help
- Exit
- Settings
- "Identifier %s is not found"
- Enter the card number
- Phone 79XXXXXXXXX
- You can use manual input or call the number:\n%s
diff --git a/android/app/src/pip/res/values-ru/strings.xml b/android/app/src/pip/res/values-ru/strings.xml
deleted file mode 100644
index 67af2f6..0000000
--- a/android/app/src/pip/res/values-ru/strings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
- PIP
-
diff --git a/android/app/src/pip/res/values-ua/strings.xml b/android/app/src/pip/res/values-ua/strings.xml
deleted file mode 100644
index 67af2f6..0000000
--- a/android/app/src/pip/res/values-ua/strings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
- PIP
-
diff --git a/assets/values-en/strings.xml b/assets/values-en/strings.xml
new file mode 100644
index 0000000..05d92ad
--- /dev/null
+++ b/assets/values-en/strings.xml
@@ -0,0 +1,113 @@
+
+ Dinect
+ Card Scanner
+ Scan
+ Help
+ Exit
+ Settings
+ "Identifier %s is not found"
+ Enter the card number
+ Phone 79XXXXXXXXX
+ You can use manual input or call the number:\n%s
+ Store ID
+ Identifier %s is not found
+ The application is activated
+ Do you really want to log out and enter a different store number?
+ Buyer
+ Card
+ Card Scanner
+ Create a purchase
+ Complete registration
+ Complete the purchase
+ You confirm the purchase for %s %s
+ Сonfirmation
+ No
+ A purchase of %s %s was completed
+ Registration
+ Usage
+ Support contacts
+ General information
+ Activation request for the application has been sent, please wait for administrator approval
+ Reward
+ Bonus on account
+ Dicount Rate
+ Dicount Sum
+ Bonus points
+ Bonus was charged
+ Points to charge
+ Coupons were used
+ Select coupons for using in purchase
+ If not set, points will be added
+ Scan
+ Sign Up
+ Specify the store ID
+ Sum
+ Update activation status
+ Yes
+ Settings
+ Help
+ Exit
+ Log Out
+ Currency
+ Language
+ Ruble
+ Ruble
+ Rubles
+ US Dollar
+ US Dollar
+ US Dollars
+ Hryvnia
+ Hryvnia
+ Hryvnia
+ Tenge
+ Tenge
+ Tenge
+ Euro
+ Euro
+ Euro
+
+Store log in screen is the first thing you will see after starting the application.
+
+Enter the store number (ID). You can look it up in the loyalty program control panel. If you do not have access to the control panel, ask the administrator.
+
+Click the ""Login"" button.
+
+Please wait while the administrator activates your request. You can refresh your store activation status by pressing the "Update activation status" button.
+
+After the administrator activates your request, click the ""Complete activation"" button. The application is ready to use.
+
+If you want to log in as another store, click the Menu button (upper right corner of the screen) and select "Exit".
+
+
+
+Step 1:
+
+Launch this application and scan your customer's loyalty card using the built in scanner.
+
+If the scan is successful, the customer's information will appear on the screen.
+
+Step 2:
+
+Enter the purchase amount and click the ""Create a purchase"" button.
+
+In a pop-up window press ""YES"" to confirm the amount and allot the points to a customer.
+
+If you want to correct the amount, press ""NO"" and you will return back to the purchase screen where you can adjust the amount.
+
+
+
+Always recommend your customers to install your loyalty card app, so they can participate in your loyalty program.
+
+If you have any problems with the application, feel free to contact the support.
+
+Phone:
+%s
+Our website:
+%s
+
+
+
+To improve barcode scanning quality, adjust the distance between the camera and the barcode so that the border around the barcode (if any) is not visible. Otherwise the vertical lines of the border could be wrongly considered as part of the code.
+
+
+
diff --git a/assets/values-es/strings.xml b/assets/values-es/strings.xml
new file mode 100644
index 0000000..62324fe
--- /dev/null
+++ b/assets/values-es/strings.xml
@@ -0,0 +1,105 @@
+
+ ID del negocio
+ ID %s no está encontrado
+ Aplicación está activada
+ Os realmente quiereis acabarse una sesión y dar otro DIN del negocio
+ El comprador
+ Tarjeta
+ El escaneo de tarjeta
+ Realizar la compra
+ Terminar el registro
+ Terminar la compra
+ Confirmais la compra por %s %s
+ Confirmacón
+ No
+ La compra por %s %s está realizada
+ El registro
+ Explotación
+ Los contactos del soporte técnico
+ El requieremento de activación de aplicación esta mandado, esperad la activación por el administrador
+ Gratificación
+ Bono por cuenta
+ Tasa de descuento
+ El monto del descuento
+ Puntos de bonificación
+ El bono fue cobrado
+ Cuántas puntuaciones se cancelan
+ Los cupones fueron canjeados
+ Si no especifica cuántos puntos cancelar, se agregarán puntos
+ Escanear
+ Registrarse
+ Hay que dar ID del negocio
+ Suma
+ Actualizar la condición de activación
+ Un nombre de usario
+ Si
+ Las configuraciones
+ La Ayuda
+ Salir
+ Log Out
+ La Moneda
+ La lengua
+ Rublo
+ Rublo
+ Rublos
+ Dólar Dolares
+ Dólar Dolares
+ Dólar Dolares
+ Hryvnia
+ Hryvnia
+ Hryvnia
+ Tenge
+ Tenge
+ Tenge
+ Euro
+ Euro
+ Euro
+
+Store log in screen is the first thing you will see after starting the application.
+
+Enter the store number (DIN). You can look it up in the loyalty program control panel. If you do
+not have access to the control panel, ask the administrator.
+
+Click the ""Login"" button.
+
+Please wait while the administrator activates your request. You can refresh your store activation
+status by pressing the ""Update activation status"" button.
+
+After the administrator activates your request, click the ""Complete activation"" button. The
+application is ready to use.
+
+If you want to log in as another store, click the Menu button (upper right corner of the screen)
+and select "Exit".
+
+
+Step 1:
+
+Launch this application and scan your customer's loyalty card using the built in scanner.
+
+If the scan is successful, the customer's information will appear on the screen.
+
+Step 2:
+
+Enter the purchase amount and click the ""Create a purchase"" button.
+
+In a pop-up window press ""YES"" to confirm the amount and allot the points to a customer.
+
+If you want to correct the amount, press ""NO"" and you will return back to the purchase screen
+where you can adjust the amount.
+
+
+Always recommend your customers to install your loyalty card app, so they can participate in your
+loyalty program.
+
+If you have any problems with the application, feel free to contact the support.
+
+Phone:
+%s
+Our website:
+%s
+
+
+To improve barcode scanning quality, adjust the distance between the camera and the barcode so
+that the border around the barcode (if any) is not visible. Otherwise the vertical lines of the
+border could be wrongly considered as part of the code.
+
diff --git a/assets/values-ru/strings.xml b/assets/values-ru/strings.xml
index 4f5a97b..c028b09 100644
--- a/assets/values-ru/strings.xml
+++ b/assets/values-ru/strings.xml
@@ -1,12 +1,112 @@
- Dinect
- Сканер карты
- Сканировать
- Справка
- Закрыть приложение
- Настройки
- "Идентификатор %s не найден"
- Введите номер карты
- Телефон 79XXXXXXXXX
- Можете воспользоваться ручным вводом или позвонить на номер:%s
+ Dinect
+ Сканер карты
+ Сканировать
+ Справка
+ Закрыть приложение
+ Настройки
+ "Идентификатор %s не найден"
+ Введите номер карты
+ Телефон 79XXXXXXXXX
+ Можете воспользоваться ручным вводом или позвонить на номер:%s
+ ID магазина
+ Идентификатор %s не найден
+ Приложение активировано
+ Вы действительно хотите выйти и ввести другой номер магазина?
+ Покупатель
+ Карта
+ Сканер карты
+ Проведение покупки
+ Завершить регистрацию
+ Завершить покупку
+ Вы подтверждаете покупку на %s %s
+ Подтверждение
+ Нет
+ Покупка на сумму %s %s проведена
+ Регистрация
+ Использование
+ Контакты поддержки
+ Общая информация
+ Запрос на активацию приложения отправлен, дождитесь подтверждения активации администратором
+ Вознаграждение
+ Бонусов на счету
+ Процент скидки
+ Сумма скидки
+ Бонусов начислено
+ Бонусов списано
+ Сколько баллов списать?
+ Были погашены купоны
+ Выберите купоны для гашения
+ Если не указано сколько баллов списать, баллы будут начислены
+ Сканировать
+ Зарегистрироваться
+ Необходимо указать ID магазина
+ Сумма
+ Обновить статус активации
+ Да
+ Настройки
+ Справка
+ Закрыть приложение
+ Выйти из аккаунта
+ Валюта
+ Язык
+ Рубль
+ Рубля
+ Рублей
+ Доллар США
+ Доллара США
+ Долларов США
+ Гривна
+ Гривны
+ Гривен
+ Тенге
+ Тенге
+ Тенге
+ Евро
+ Евро
+ Евро
+
+
+После запуска приложения вы окажетесь на странице регистрации магазина.
+
+Введите ID код магазина (выдается при подключении к системе лояльности)
+
+Кликните по кнопке: «Зарегистрировать»
+Дождитесь подтверждение активации программы, нажатием по кнопке «Обновите статус активации» обновите статус.
+
+После подтверждения запроса на активацию программы Партнером/менеджером кликните по кнопке «Завершить регистрацию», приложение готово к использованию.
+
+При желании изменить ID магазина, необходимо нажать на кнопку Меню (верхний правый угол экрана) и выбрать "Выход".
+
+
+
+Шаг 1:
+
+Запустите приложение для сканирования карты участника системы лояльности.
+
+При успешном сканировании на вашем экране появятся данные покупателя.
+
+Шаг 2:
+
+Введите сумму покупки данного покупателя и нажмите на кнопку «Проведение покупки».
+
+Во всплывающем окне нажмите ""ДА"", для подтверждения суммы покупки
+
+Если вы хотите поправить сумму, нажмите «НЕТ» и Вы вернетесь на экран покупки и сможете её скорректировать.
+
+
+
+Рекомендуйте покупателям установить мобильное приложение дисконтной системы и получайте новых лояльных покупателей.
+
+При некорректной работе приложения просьба сразу обратиться по телефону нашей технической поддержки.
+
+Телефон:
+%s
+Наш сайт:
+%s
+
+
+
+Для эффективного считывания штрих-кода карты участника системы лояльности необходимо камеру сканера поднести так, чтобы в неё не попадали вертикальные полосы рамки (если они есть). Они расцениваются сканером как часть штрих-кода.
+
diff --git a/assets/values-ua/strings.xml b/assets/values-ua/strings.xml
index 805694c..5cf2d22 100644
--- a/assets/values-ua/strings.xml
+++ b/assets/values-ua/strings.xml
@@ -1,12 +1,109 @@
- Dinect
- Сканер карти
- Сканувати
- Допомога
- Закрыть приложение
- Налаштування
- "Ідентифікатор %s не знайден"
- Введіть штрихкод вручну
- Телефон 79XXXXXXXXX
- Можете скористатися ручним введенням або зателефонувати на номер:\n%s
+ Dinect
+ Сканер карти
+ Сканувати
+ Допомога
+ Закрыть приложение
+ Налаштування
+ "Ідентифікатор %s не знайден
+ Введіть штрихкод вручну
+ Телефон 79XXXXXXXXX
+ Можете скористатися ручним введенням або зателефонувати на номер:\n%s
+ ID магазину
+ Ідентифікатор %s не знайден
+ Додаток активований
+ Ви дійсно хочете вийти і ввести інший номер магазину
+ Покупець
+ Карта
+ Сканер карти
+ Проведення покупки
+ Завершити реєстрацію
+ Завершити купівлю
+ Ви підтверджуєте покупку на %s %s
+ Підтвердження
+ Ні
+ Купівля на суму %s %s проведена
+ Реєстрація
+ Використання
+ Контакти підтримки
+ Загальна інформація
+ Запит на активацію додатку відправлений, дочекайтеся підтвердження активації адміністратором
+ Винагорода
+ Бонусів на рахунку
+ Відсоток знижки
+ Сума знижки
+ Бонусів нараховано
+ Бонусів списано
+ Скільки балів списати?
+ Були погашені купони
+ Якщо не вказано скільки балів списати, бали будуть нараховані
+ Сканувати
+ Зареєструватися
+ Необхідно вказати ID магазину
+ Сума
+ Оновити статус активації
+ Так
+ Налаштування
+ Допомога
+ Вихід
+ Log Out
+ Валюта
+ Мова
+ Рубль
+ Рубль
+ Рубль
+ Доллар США
+ Доллар США
+ Доллар США
+ Гривня
+ Гривня
+ Гривня
+ Тенге
+ Тенге
+ Тенге
+ Євро
+ Євро
+ Євро
+
+Після запуску програми ви опинитеся на сторінці реєстрації магазина.
+
+Введіть DIN код магазину (видається при підключенні до системи лояльності)
+
+Натисніть на кнопку «Зареєструвати»
+Дочекайтеся підтвердження активації програми, натисканням на кнопку «Оновлення статус активації» поновіть статус.
+
+Після підтвердження запиту на активацію програми Партнером / менеджером клікніть по кнопці «Завершити реєстрацію», додаток готове до використання.
+
+При бажанні змінити номер каси, необхідно натиснути на кнопку Меню (верхній правий кут екрану) і вибрати "Вихід".
+
+
+Крок 1:
+
+При пред'явленні покупцем картки учасника системи лояльності, запустіть цю програму.
+
+На екрані з'явиться сканер штрих кодів. Відскануте штрих-код карти сканером.
+
+При успішному скануванні на вашому екрані з'являться дані покупця.
+
+Крок 2:
+
+Необхідно ввести суму покупки даного покупця і клікнути на кнопку «Проведення покупки».
+
+Спливе вікно підтвердження правильності введення суми. У разі правильного введення суми, натисніть «ТАК», сума буде проведена і винагороду буде нараховано учаснику системи лояльності.
+
+Якщо сума введена з помилкою, натисніть «НІ» і Ви повернетеся на крок введення суми і зможете її скорегувати.
+
+
+Рекомендуйте покупцям встановити мобільний додаток дисконтної системи і отримуйте нових лояльних покупців.
+
+При некоректній роботі програми прохання відразу звернутися за телефоном нашої технічної підтримки.
+
+Телефон:
+%s
+Наш сайт:
+%s
+
+
+Для ефективного зчитування штрих-коду карти учасника системи лояльності необхідно камеру сканера піднести так, щоб в неї не потрапляли вертикальні смуги рамки. Вони розцінюються сканером як частина штрих-коду.
+
diff --git a/lib/base/settings_base_state.dart b/lib/base/settings_base_state.dart
index 1ca0aae..33f9274 100644
--- a/lib/base/settings_base_state.dart
+++ b/lib/base/settings_base_state.dart
@@ -4,7 +4,8 @@ import 'package:checker/db.dart';
import 'package:checker/strings.dart';
import 'package:flutter/material.dart';
-abstract class SettingsBaseState extends BaseState {
+abstract class SettingsBaseState
+ extends BaseState {
SettingsBaseState(SqliteHelper helper, String app) {
this.helper = helper;
@@ -15,7 +16,7 @@ abstract class SettingsBaseState extends BaseState
@override Widget build(BuildContext context) {
return new Scaffold(appBar: getAppBar(),
- body: getScreenContent());
+ body: getScreenContent());
}
@override
@@ -43,26 +44,27 @@ abstract class SettingsBaseState extends BaseState
Widget getItem(String option) {
return new Container(
- height: 56.0,
- child: (new FlatButton(onPressed: () {
+ height: 56.0,
+ child: (new FlatButton(onPressed: () {
+ setState(() {
saveOption();
- setState(() {
- selectedItem = getOptions().indexOf(option);
- });
- },
- child: new Row(children: [
- new Expanded(child: new Text(option)),
- getCheckMark(getOptions().indexOf(option))]))));
+ selectedItem = getOptions().indexOf(option);
+ });
+ },
+ child: new Row(children: [
+ new Expanded(child: new Text(option)),
+ getCheckMark(getOptions().indexOf(option))
+ ]))));
}
Widget getCheckMark(int index) {
return index == selectedItem ? new Image.asset(check_png,
- width: 28.0,
- height: 28.0) : new Image.asset(check_png, color: new Color(0xffffff));
+ width: 28.0,
+ height: 28.0) : new Image.asset(check_png, color: new Color(0xffffff));
}
@override
String getTitle() {
return StringsLocalization.settings();
}
-}
\ No newline at end of file
+}
diff --git a/lib/common.dart b/lib/common.dart
index 6035ed0..c040966 100644
--- a/lib/common.dart
+++ b/lib/common.dart
@@ -5,7 +5,6 @@ import 'package:checker/screens/splash.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:image_picker/image_picker.dart';
-import 'package:intl/intl.dart';
import 'db.dart';
import 'dart:convert';
@@ -46,9 +45,8 @@ logout(BuildContext context, SqliteHelper helper) async {
helper.clear().then((result) {
// helper.close().then((_) {
// Navigator.of(context).pop();
-// Navigator.of(context).pop();
- pushRouteReplacement(
- context, new SplashScreen()); // Запускаем регистрацию
+ Navigator.of(context).pop();
+ pushRouteReplacement(context, new SplashScreen()); // Запускаем регистрацию
// });
});
}).catchError((error) {
@@ -162,13 +160,16 @@ startScanner(BuildContext context, String app, SqliteHelper helper) async {
}
});
- platform.invokeMethod('startScanner', {
+ Map args = StringsLocalization.strings;
+ args.addAll({
'token': token,
'url': await platform.invokeMethod('getEndpoint'),
'appToken': await platform.invokeMethod('getAppToken'),
- 'locale': Intl.defaultLocale,
- 'color': Resources.getPrimaryColor(app).value
+ 'locale': StringsLocalization.localeCode,
+ 'color': Resources.getPrimaryColor(app).value.toString()
});
+
+ platform.invokeMethod('startScanner', args);
}
}
}
diff --git a/lib/i18n/messages_all.dart b/lib/i18n/messages_all.dart
deleted file mode 100644
index 7e32ab7..0000000
--- a/lib/i18n/messages_all.dart
+++ /dev/null
@@ -1,62 +0,0 @@
-// DO NOT EDIT. This is code generated via package:intl/generate_localized.dart
-// This is a library that looks up messages for specific locales by
-// delegating to the appropriate library.
-
-import 'dart:async';
-
-import 'package:intl/intl.dart';
-import 'package:intl/message_lookup_by_library.dart';
-import 'package:intl/src/intl_helpers.dart';
-
-import 'messages_en.dart' as messages_messages_en;
-import 'messages_es.dart' as messages_messages_es;
-import 'messages_ru.dart' as messages_messages_ru;
-import 'messages_ua.dart' as messages_messages_ua;
-
-typedef Future LibraryLoader();
-Map _deferredLibraries = {
- 'en': () => new Future.value(null),
- 'es': () => new Future.value(null),
- 'ru': () => new Future.value(null),
- 'ua': () => new Future.value(null),
-};
-
-MessageLookupByLibrary _findExact(localeName) {
- switch (localeName) {
- case 'en':
- return messages_messages_en.messages;
- case 'es':
- return messages_messages_es.messages;
- case 'ru':
- return messages_messages_ru.messages;
- case 'ua':
- return messages_messages_ua.messages;
- default:
- return null;
- }
-}
-
-/// User programs should call this before using [localeName] for messages.
-Future initializeMessages(String localeName) {
- var lib = _deferredLibraries[Intl.canonicalizedLocale(localeName)];
- var load = lib == null ? new Future.value(false) : lib();
- return load.then((_) {
- initializeInternalMessageLookup(() => new CompositeMessageLookup());
- messageLookup.addLocale(localeName, _findGeneratedMessagesFor);
- });
-}
-
-bool _messagesExistFor(String locale) {
- var messages;
- try {
- messages = _findExact(locale);
- } catch (e) {}
- return messages != null;
-}
-
-MessageLookupByLibrary _findGeneratedMessagesFor(locale) {
- var actualLocale = Intl.verifiedLocale(locale, _messagesExistFor,
- onFailure: (_) => null);
- if (actualLocale == null) return null;
- return _findExact(actualLocale);
-}
diff --git a/lib/i18n/messages_en.dart b/lib/i18n/messages_en.dart
deleted file mode 100644
index 405a6be..0000000
--- a/lib/i18n/messages_en.dart
+++ /dev/null
@@ -1,112 +0,0 @@
-// DO NOT EDIT. This is code generated via package:intl/generate_localized.dart
-// This is a library that provides messages for a messages_en locale. All the
-// messages from the main program should be duplicated here with the same
-// function name.
-
-import 'package:intl/intl.dart';
-import 'package:intl/message_lookup_by_library.dart';
-
-final messages = new MessageLookup();
-
-final _keepAnalysisHappy = Intl.defaultLocale;
-
-class MessageLookup extends MessageLookupByLibrary {
- get localeName => 'messages_en';
-
- final messages = _notInlinedMessages(_notInlinedMessages);
- static _notInlinedMessages(_) => {
- "ID_Store" : MessageLookupByLibrary.simpleMessage("Store ID"),
- "ID_not_found" : MessageLookupByLibrary.simpleMessage("Identifier %s is not found"),
- "app_activ" : MessageLookupByLibrary.simpleMessage("The application is activated"),
- "ask_change_store" : MessageLookupByLibrary.simpleMessage("Do you really want to log out and enter a different store number?"),
- "buyer" : MessageLookupByLibrary.simpleMessage("Buyer"),
- "card" : MessageLookupByLibrary.simpleMessage("Card"),
- "card_scaner" : MessageLookupByLibrary.simpleMessage("Card Scanner"),
- "carry_purchase" : MessageLookupByLibrary.simpleMessage("Create a purchase"),
- "complite_activ" : MessageLookupByLibrary.simpleMessage("Complete registration"),
- "complite_purchase" : MessageLookupByLibrary.simpleMessage("Complete the purchase"),
- "confirm_purchase" : MessageLookupByLibrary.simpleMessage("You confirm the purchase for %s %s"),
- "confirmation" : MessageLookupByLibrary.simpleMessage("Сonfirmation"),
- "no" : MessageLookupByLibrary.simpleMessage("No"),
- "purchase_complite" : MessageLookupByLibrary.simpleMessage("A purchase of %s %s was completed"),
- "registration" : MessageLookupByLibrary.simpleMessage("Registration"),
- "usage" : MessageLookupByLibrary.simpleMessage("Usage"),
- "support" : MessageLookupByLibrary.simpleMessage("Support contacts"),
- "common" : MessageLookupByLibrary.simpleMessage("General information"),
- "request_sent_wait_activ" : MessageLookupByLibrary.simpleMessage("Activation request for the application has been sent, please wait for administrator approval"),
- "reward" : MessageLookupByLibrary.simpleMessage("Reward"),
- "bonus" : MessageLookupByLibrary.simpleMessage("Bonus on account"),
- "discount_rate" : MessageLookupByLibrary.simpleMessage("Dicount Rate"),
- "discount_sum" : MessageLookupByLibrary.simpleMessage("Dicount Sum"),
- "bonus_plus" : MessageLookupByLibrary.simpleMessage("Bonus points"),
- "bonus_minus" : MessageLookupByLibrary.simpleMessage("Bonus was charged"),
- "bonus_hint" : MessageLookupByLibrary.simpleMessage("Points to charge"),
- "coupons_used" : MessageLookupByLibrary.simpleMessage("Coupons were used"),
- "select_coupons" : MessageLookupByLibrary.simpleMessage("Select coupons for using in purchase"),
- "bonus_explanation" : MessageLookupByLibrary.simpleMessage("If not set, points will be added"),
- "scan" : MessageLookupByLibrary.simpleMessage("Scan"),
- "sign_up" : MessageLookupByLibrary.simpleMessage("Sign Up"),
- "specify_din_store" : MessageLookupByLibrary.simpleMessage("Specify the store ID"),
- "sum" : MessageLookupByLibrary.simpleMessage("Sum"),
- "update_activ_status" : MessageLookupByLibrary.simpleMessage("Update activation status"),
- "yes" : MessageLookupByLibrary.simpleMessage("Yes"),
- "settings" : MessageLookupByLibrary.simpleMessage("Settings"),
- "help" : MessageLookupByLibrary.simpleMessage("Help"),
- "exit" : MessageLookupByLibrary.simpleMessage("Exit"),
- "logout" : MessageLookupByLibrary.simpleMessage("Log Out"),
- "currency" : MessageLookupByLibrary.simpleMessage("Currency"),
- "locale" : MessageLookupByLibrary.simpleMessage("Language"),
- "nominative_ruble": MessageLookupByLibrary.simpleMessage("Ruble"),
- "singular_ruble": MessageLookupByLibrary.simpleMessage("Ruble"),
- "plural_ruble": MessageLookupByLibrary.simpleMessage("Rubles"),
- "nominative_dollar": MessageLookupByLibrary.simpleMessage("US Dollar"),
- "singular_dollar": MessageLookupByLibrary.simpleMessage("US Dollar"),
- "plural_dollar": MessageLookupByLibrary.simpleMessage("US Dollars"),
- "nominative_hryvna": MessageLookupByLibrary.simpleMessage("Hryvnia"),
- "singular_hryvna": MessageLookupByLibrary.simpleMessage("Hryvnia"),
- "plural_hryvna": MessageLookupByLibrary.simpleMessage("Hryvnia"),
- "nominative_tenge": MessageLookupByLibrary.simpleMessage("Tenge"),
- "singular_tenge": MessageLookupByLibrary.simpleMessage("Tenge"),
- "plural_tenge": MessageLookupByLibrary.simpleMessage("Tenge"),
- "nominative_euro": MessageLookupByLibrary.simpleMessage("Euro"),
- "singular_euro": MessageLookupByLibrary.simpleMessage("Euro"),
- "plural_euro": MessageLookupByLibrary.simpleMessage("Euro"),
- "registration_guide": MessageLookupByLibrary.simpleMessage('''
-Store log in screen is the first thing you will see after starting the application.
-
-Enter the store number (ID). You can look it up in the loyalty program control panel. If you do not have access to the control panel, ask the administrator.
-
-Click the ""Login"" button.
-
-Please wait while the administrator activates your request. You can refresh your store activation status by pressing the ""Update activation status"" button.
-
-After the administrator activates your request, click the ""Complete activation"" button. The application is ready to use.
-
-If you want to log in as another store, click the Menu button (upper right corner of the screen) and select "Exit".
-'''),
- "usage_guide": MessageLookupByLibrary.simpleMessage('''
-Step 1:
-
-Launch this application and scan your customer's loyalty card using the built in scanner.
-
-If the scan is successful, the customer's information will appear on the screen.
-
-Step 2:
-
-Enter the purchase amount and click the ""Create a purchase"" button.
-
-In a pop-up window press ""YES"" to confirm the amount and allot the points to a customer.
-
-If you want to correct the amount, press ""NO"" and you will return back to the purchase screen where you can adjust the amount.
-'''),
- "support_guide": MessageLookupByLibrary.simpleMessage('''
-Always recommend your customers to install your loyalty card app, so they can participate in your loyalty program.
-
-If you have any problems with the application, feel free to contact the support.
-
-Phone:\n%s\n
-Our website:\n%s'''),
- "common_guide": MessageLookupByLibrary.simpleMessage('''
-To improve barcode scanning quality, adjust the distance between the camera and the barcode so that the border around the barcode (if any) is not visible. Otherwise the vertical lines of the border could be wrongly considered as part of the code.''')
- };
-}
diff --git a/lib/i18n/messages_es.dart b/lib/i18n/messages_es.dart
deleted file mode 100644
index 33e18c2..0000000
--- a/lib/i18n/messages_es.dart
+++ /dev/null
@@ -1,111 +0,0 @@
-// DO NOT EDIT. This is code generated via package:intl/generate_localized.dart
-// This is a library that provides messages for a messages_es locale. All the
-// messages from the main program should be duplicated here with the same
-// function name.
-
-import 'package:intl/intl.dart';
-import 'package:intl/message_lookup_by_library.dart';
-
-final messages = new MessageLookup();
-
-final _keepAnalysisHappy = Intl.defaultLocale;
-
-class MessageLookup extends MessageLookupByLibrary {
- get localeName => 'messages_es';
-
- final messages = _notInlinedMessages(_notInlinedMessages);
- static _notInlinedMessages(_) => {
- "ID_Store" : MessageLookupByLibrary.simpleMessage("ID del negocio "),
- "ID_not_found" : MessageLookupByLibrary.simpleMessage("ID %s no está encontrado"),
- "app_activ" : MessageLookupByLibrary.simpleMessage("Aplicación está activada"),
- "ask_change_store" : MessageLookupByLibrary.simpleMessage("¿Os realmente quiereis acabarse una sesión y dar otro DIN del negocio?"),
- "buyer" : MessageLookupByLibrary.simpleMessage("El comprador"),
- "card" : MessageLookupByLibrary.simpleMessage("Tarjeta"),
- "card_scaner" : MessageLookupByLibrary.simpleMessage("El escaneo de tarjeta"),
- "carry_purchase" : MessageLookupByLibrary.simpleMessage("Realizar la compra"),
- "complite_activ" : MessageLookupByLibrary.simpleMessage("Terminar el registro"),
- "complite_purchase" : MessageLookupByLibrary.simpleMessage("Terminar la compra"),
- "confirm_purchase" : MessageLookupByLibrary.simpleMessage("¿Confirmais la compra por %s %s"),
- "confirmation" : MessageLookupByLibrary.simpleMessage("Confirmacón"),
- "no" : MessageLookupByLibrary.simpleMessage("No"),
- "purchase_complite" : MessageLookupByLibrary.simpleMessage("La compra por %s %s está realizada"),
- "registration" : MessageLookupByLibrary.simpleMessage("El registro"),
- "usage" : MessageLookupByLibrary.simpleMessage("Explotación"),
- "support" : MessageLookupByLibrary.simpleMessage("Los contactos del soporte técnico"),
- "request_sent_wait_activ" : MessageLookupByLibrary.simpleMessage("El requieremento de activación de aplicación esta mandado, esperad la activación por el administrador."),
- "reward" : MessageLookupByLibrary.simpleMessage("Gratificación"),
- "bonus" : MessageLookupByLibrary.simpleMessage("Bono por cuenta"),
- "discount_rate" : MessageLookupByLibrary.simpleMessage("Tasa de descuento"),
- "discount_sum" : MessageLookupByLibrary.simpleMessage("El monto del descuento"),
- "bonus_plus" : MessageLookupByLibrary.simpleMessage("Puntos de bonificación"),
- "bonus_minus" : MessageLookupByLibrary.simpleMessage("El bono fue cobrado"),
- "bonus_hint" : MessageLookupByLibrary.simpleMessage("¿Cuántas puntuaciones se cancelan?"),
- "coupons_used" : MessageLookupByLibrary.simpleMessage("Los cupones fueron canjeados"),
- "bonus_explanation" : MessageLookupByLibrary.simpleMessage("Si no especifica cuántos puntos cancelar, se agregarán puntos"),
- "scan" : MessageLookupByLibrary.simpleMessage("Escanear"),
- "sign_up" : MessageLookupByLibrary.simpleMessage("Registrarse"),
- "specify_din_store" : MessageLookupByLibrary.simpleMessage("Hay que dar ID del negocio"),
- "sum" : MessageLookupByLibrary.simpleMessage("Suma"),
- "update_activ_status" : MessageLookupByLibrary.simpleMessage("Actualizar la condición de activación"),
- "user_name" : MessageLookupByLibrary.simpleMessage("Un nombre de usario"),
- "yes" : MessageLookupByLibrary.simpleMessage("Si"),
- "settings" : MessageLookupByLibrary.simpleMessage("Las configuraciones"),
- "help" : MessageLookupByLibrary.simpleMessage("La Ayuda"),
- "exit" : MessageLookupByLibrary.simpleMessage("Salir"),
- "logout" : MessageLookupByLibrary.simpleMessage("Log Out"),
- "currency" : MessageLookupByLibrary.simpleMessage("La Moneda"),
- "locale" : MessageLookupByLibrary.simpleMessage("La lengua"),
- "nominative_ruble": MessageLookupByLibrary.simpleMessage("Rublo"),
- "singular_ruble": MessageLookupByLibrary.simpleMessage("Rublo"),
- "plural_ruble": MessageLookupByLibrary.simpleMessage("Rublos"),
- "nominative_dollar": MessageLookupByLibrary.simpleMessage("Dólar Dolares"),
- "singular_dollar": MessageLookupByLibrary.simpleMessage("Dólar Dolares"),
- "plural_dollar": MessageLookupByLibrary.simpleMessage("Dólar Dolares"),
- "nominative_hryvna": MessageLookupByLibrary.simpleMessage("Hryvnia"),
- "singular_hryvna": MessageLookupByLibrary.simpleMessage("Hryvnia"),
- "plural_hryvna": MessageLookupByLibrary.simpleMessage("Hryvnia"),
- "nominative_tenge": MessageLookupByLibrary.simpleMessage("Tenge"),
- "singular_tenge": MessageLookupByLibrary.simpleMessage("Tenge"),
- "plural_tenge": MessageLookupByLibrary.simpleMessage("Tenge"),
- "nominative_euro": MessageLookupByLibrary.simpleMessage("Euro"),
- "singular_euro": MessageLookupByLibrary.simpleMessage("Euro"),
- "plural_euro": MessageLookupByLibrary.simpleMessage("Euro"),
- "registration_guide": MessageLookupByLibrary.simpleMessage('''
-Store log in screen is the first thing you will see after starting the application.
-
-Enter the store number (DIN). You can look it up in the loyalty program control panel. If you do not have access to the control panel, ask the administrator.
-
-Click the ""Login"" button.
-
-Please wait while the administrator activates your request. You can refresh your store activation status by pressing the ""Update activation status"" button.
-
-After the administrator activates your request, click the ""Complete activation"" button. The application is ready to use.
-
-If you want to log in as another store, click the Menu button (upper right corner of the screen) and select "Exit".
-'''),
- "usage_guide": MessageLookupByLibrary.simpleMessage('''
-Step 1:
-
-Launch this application and scan your customer's loyalty card using the built in scanner.
-
-If the scan is successful, the customer's information will appear on the screen.
-
-Step 2:
-
-Enter the purchase amount and click the ""Create a purchase"" button.
-
-In a pop-up window press ""YES"" to confirm the amount and allot the points to a customer.
-
-If you want to correct the amount, press ""NO"" and you will return back to the purchase screen where you can adjust the amount.
-'''),
- "support_guide": MessageLookupByLibrary.simpleMessage('''
-Always recommend your customers to install your loyalty card app, so they can participate in your loyalty program.
-
-If you have any problems with the application, feel free to contact the support.
-
-Phone:\n%s\n
-Our website:\n%s'''),
- "common_guide": MessageLookupByLibrary.simpleMessage('''
-To improve barcode scanning quality, adjust the distance between the camera and the barcode so that the border around the barcode (if any) is not visible. Otherwise the vertical lines of the border could be wrongly considered as part of the code.''')
- };
-}
diff --git a/lib/i18n/messages_ru.dart b/lib/i18n/messages_ru.dart
deleted file mode 100644
index 4fb408a..0000000
--- a/lib/i18n/messages_ru.dart
+++ /dev/null
@@ -1,113 +0,0 @@
-// DO NOT EDIT. This is code generated via package:intl/generate_localized.dart
-// This is a library that provides messages for a messages_ru locale. All the
-// messages from the main program should be duplicated here with the same
-// function name.
-
-import 'package:intl/intl.dart';
-import 'package:intl/message_lookup_by_library.dart';
-
-final messages = new MessageLookup();
-
-final _keepAnalysisHappy = Intl.defaultLocale;
-
-class MessageLookup extends MessageLookupByLibrary {
- get localeName => 'messages_ru';
-
- final messages = _notInlinedMessages(_notInlinedMessages);
- static _notInlinedMessages(_) => {
- "ID_Store" : MessageLookupByLibrary.simpleMessage("ID магазина"),
- "ID_not_found" : MessageLookupByLibrary.simpleMessage("Идентификатор %s не найден"),
- "app_activ" : MessageLookupByLibrary.simpleMessage("Приложение активировано"),
- "ask_change_store" : MessageLookupByLibrary.simpleMessage("Вы действительно хотите выйти и ввести другой номер магазина?"),
- "buyer" : MessageLookupByLibrary.simpleMessage("Покупатель"),
- "card" : MessageLookupByLibrary.simpleMessage("Карта"),
- "card_scaner" : MessageLookupByLibrary.simpleMessage("Сканер карты"),
- "carry_purchase" : MessageLookupByLibrary.simpleMessage("Проведение покупки"),
- "complite_activ" : MessageLookupByLibrary.simpleMessage("Завершить регистрацию"),
- "complite_purchase" : MessageLookupByLibrary.simpleMessage("Завершить покупку"),
- "confirm_purchase" : MessageLookupByLibrary.simpleMessage("Вы подтверждаете покупку на %s %s"),
- "confirmation" : MessageLookupByLibrary.simpleMessage("Подтверждение"),
- "no" : MessageLookupByLibrary.simpleMessage("Нет"),
- "purchase_complite" : MessageLookupByLibrary.simpleMessage("Покупка на сумму %s %s проведена"),
- "registration" : MessageLookupByLibrary.simpleMessage("Регистрация"),
- "usage" : MessageLookupByLibrary.simpleMessage("Использование"),
- "support" : MessageLookupByLibrary.simpleMessage("Контакты поддержки"),
- "common" : MessageLookupByLibrary.simpleMessage("Общая информация"),
- "request_sent_wait_activ" : MessageLookupByLibrary.simpleMessage("Запрос на активацию приложения отправлен, дождитесь подтверждения активации администратором"),
- "reward" : MessageLookupByLibrary.simpleMessage("Вознаграждение"),
- "bonus" : MessageLookupByLibrary.simpleMessage("Бонусов на счету"),
- "discount_rate" : MessageLookupByLibrary.simpleMessage("Процент скидки"),
- "discount_sum" : MessageLookupByLibrary.simpleMessage("Сумма скидки"),
- "bonus_plus" : MessageLookupByLibrary.simpleMessage("Бонусов начислено"),
- "bonus_minus" : MessageLookupByLibrary.simpleMessage("Бонусов списано"),
- "bonus_hint" : MessageLookupByLibrary.simpleMessage("Сколько баллов списать?"),
- "coupons_used" : MessageLookupByLibrary.simpleMessage("Были погашены купоны"),
- "select_coupons" : MessageLookupByLibrary.simpleMessage("Выберите купоны для гашения"),
- "bonus_explanation" : MessageLookupByLibrary.simpleMessage("Если не указано сколько баллов списать, баллы будут начислены"),
- "scan" : MessageLookupByLibrary.simpleMessage("Сканировать"),
- "sign_up" : MessageLookupByLibrary.simpleMessage("Зарегистрироваться"),
- "specify_din_store" : MessageLookupByLibrary.simpleMessage("Необходимо указать ID магазина"),
- "sum" : MessageLookupByLibrary.simpleMessage("Сумма"),
- "update_activ_status" : MessageLookupByLibrary.simpleMessage("Обновить статус активации"),
- "yes" : MessageLookupByLibrary.simpleMessage("Да"),
- "settings" : MessageLookupByLibrary.simpleMessage("Настройки"),
- "help" : MessageLookupByLibrary.simpleMessage("Справка"),
- "exit" : MessageLookupByLibrary.simpleMessage("Закрыть приложение"),
- "logout" : MessageLookupByLibrary.simpleMessage("Выйти из аккаунта"),
- "currency" : MessageLookupByLibrary.simpleMessage("Валюта"),
- "locale" : MessageLookupByLibrary.simpleMessage("Язык"),
- "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("Евро"),
- "registration_guide": MessageLookupByLibrary.simpleMessage('''
-После запуска приложения вы окажетесь на странице регистрации магазина.
-
-Введите ID код магазина (выдается при подключении к системе лояльности)
-
-Кликните по кнопке: «Зарегистрировать»
-Дождитесь подтверждение активации программы, нажатием по кнопке «Обновите статус активации» обновите статус.
-
-После подтверждения запроса на активацию программы Партнером/менеджером кликните по кнопке «Завершить регистрацию», приложение готово к использованию.
-
-При желании изменить ID магазина, необходимо нажать на кнопку Меню (верхний правый угол экрана) и выбрать ""Выход"".
-'''),
- "usage_guide": MessageLookupByLibrary.simpleMessage('''
-Шаг 1:
-
-Запустите приложение для сканирования карты участника системы лояльности.
-
-При успешном сканировании на вашем экране появятся данные покупателя.
-
-Шаг 2:
-
-Введите сумму покупки данного покупателя и нажмите на кнопку «Проведение покупки».
-
-Во всплывающем окне нажмите ""ДА"", для подтверждения суммы покупки
-
-Если вы хотите поправить сумму, нажмите «НЕТ» и Вы вернетесь на экран покупки и сможете её скорректировать.
-'''),
- "support_guide": MessageLookupByLibrary.simpleMessage('''
-Рекомендуйте покупателям установить мобильное приложение дисконтной системы и получайте новых лояльных покупателей.
-
-При некорректной работе приложения просьба сразу обратиться по телефону нашей технической поддержки.
-
-Телефон:\n%s\n
-Наш сайт:\n%s
-'''),
- "common_guide": MessageLookupByLibrary.simpleMessage('''
- Для эффективного считывания штрих-кода карты участника системы лояльности необходимо камеру сканера поднести так, чтобы в неё не попадали вертикальные полосы рамки (если они есть). Они расцениваются сканером как часть штрих-кода.
-''')
- };
-}
diff --git a/lib/i18n/messages_ua.dart b/lib/i18n/messages_ua.dart
deleted file mode 100644
index 9e956d3..0000000
--- a/lib/i18n/messages_ua.dart
+++ /dev/null
@@ -1,114 +0,0 @@
-// DO NOT EDIT. This is code generated via package:intl/generate_localized.dart
-// This is a library that provides messages for a messages_ua locale. All the
-// messages from the main program should be duplicated here with the same
-// function name.
-
-import 'package:intl/intl.dart';
-import 'package:intl/message_lookup_by_library.dart';
-
-final messages = new MessageLookup();
-
-final _keepAnalysisHappy = Intl.defaultLocale;
-
-class MessageLookup extends MessageLookupByLibrary {
- get localeName => 'messages_ua';
-
- final messages = _notInlinedMessages(_notInlinedMessages);
- static _notInlinedMessages(_) => {
- "ID_Store" : MessageLookupByLibrary.simpleMessage("ID магазину"),
- "ID_not_found" : MessageLookupByLibrary.simpleMessage("Ідентифікатор %s не знайден"),
- "app_activ" : MessageLookupByLibrary.simpleMessage("Додаток активований"),
- "ask_change_store" : MessageLookupByLibrary.simpleMessage("Ви дійсно хочете вийти і ввести інший номер магазину"),
- "buyer" : MessageLookupByLibrary.simpleMessage("Покупець"),
- "card" : MessageLookupByLibrary.simpleMessage("Карта"),
- "card_scaner" : MessageLookupByLibrary.simpleMessage("Сканер карти"),
- "carry_purchase" : MessageLookupByLibrary.simpleMessage("Проведення покупки"),
- "complite_activ" : MessageLookupByLibrary.simpleMessage("Завершити реєстрацію"),
- "complite_purchase" : MessageLookupByLibrary.simpleMessage("Завершити купівлю"),
- "confirm_purchase" : MessageLookupByLibrary.simpleMessage("Ви підтверджуєте покупку на %s %s"),
- "confirmation" : MessageLookupByLibrary.simpleMessage("Підтвердження"),
- "no" : MessageLookupByLibrary.simpleMessage("Ні"),
- "purchase_complite" : MessageLookupByLibrary.simpleMessage("Купівля на суму %s %s проведена"),
- "registration" : MessageLookupByLibrary.simpleMessage("Реєстрація"),
- "usage" : MessageLookupByLibrary.simpleMessage("Використання"),
- "support" : MessageLookupByLibrary.simpleMessage("Контакти підтримки"),
- "common" : MessageLookupByLibrary.simpleMessage("Загальна інформація"),
- "request_sent_wait_activ" : MessageLookupByLibrary.simpleMessage("Запит на активацію додатку відправлений, дочекайтеся підтвердження активації адміністратором"),
- "reward" : MessageLookupByLibrary.simpleMessage("Винагорода"),
- "bonus" : MessageLookupByLibrary.simpleMessage("Бонусів на рахунку"),
- "discount_rate" : MessageLookupByLibrary.simpleMessage("Відсоток знижки"),
- "discount_sum" : MessageLookupByLibrary.simpleMessage("Сума знижки"),
- "bonus_plus" : MessageLookupByLibrary.simpleMessage("Бонусів нараховано"),
- "bonus_minus" : MessageLookupByLibrary.simpleMessage("Бонусів списано"),
- "bonus_hint" : MessageLookupByLibrary.simpleMessage("Скільки балів списати?"),
- "coupons_used" : MessageLookupByLibrary.simpleMessage("Були погашені купони"),
- "bonus_explanation" : MessageLookupByLibrary.simpleMessage("Якщо не вказано скільки балів списати, бали будуть нараховані"),
- "scan" : MessageLookupByLibrary.simpleMessage("Сканувати"),
- "sign_up" : MessageLookupByLibrary.simpleMessage("Зареєструватися"),
- "specify_din_store" : MessageLookupByLibrary.simpleMessage("Необхідно вказати ID магазину"),
- "sum" : MessageLookupByLibrary.simpleMessage("Сума"),
- "update_activ_status" : MessageLookupByLibrary.simpleMessage("Оновити статус активації"),
- "yes" : MessageLookupByLibrary.simpleMessage("Так"),
- "settings" : MessageLookupByLibrary.simpleMessage("Налаштування"),
- "help" : MessageLookupByLibrary.simpleMessage("Допомога"),
- "exit" : MessageLookupByLibrary.simpleMessage("Вихід"),
- "logout" : MessageLookupByLibrary.simpleMessage("Log Out"),
- "currency" : MessageLookupByLibrary.simpleMessage("Валюта"),
- "locale" : MessageLookupByLibrary.simpleMessage("Мова"),
- "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("Євро"),
- "registration_guide": MessageLookupByLibrary.simpleMessage('''
-Після запуску програми ви опинитеся на сторінці реєстрації магазина.
-
-Введіть DIN код магазину (видається при підключенні до системи лояльності)
-
-Натисніть на кнопку «Зареєструвати»
-Дочекайтеся підтвердження активації програми, натисканням на кнопку «Оновлення статус активації» поновіть статус.
-
-Після підтвердження запиту на активацію програми Партнером / менеджером клікніть по кнопці «Завершити реєстрацію», додаток готове до використання.
-
-При бажанні змінити номер каси, необхідно натиснути на кнопку Меню (верхній правий кут екрану) і вибрати "Вихід".
-'''),
- "usage_guide": MessageLookupByLibrary.simpleMessage('''
-Крок 1:
-
-При пред'явленні покупцем картки учасника системи лояльності, запустіть цю програму.
-
-На екрані з'явиться сканер штрих кодів. Відскануте штрих-код карти сканером.
-
-При успішному скануванні на вашому екрані з'являться дані покупця.
-
-Крок 2:
-
-Необхідно ввести суму покупки даного покупця і клікнути на кнопку «Проведення покупки».
-
-Спливе вікно підтвердження правильності введення суми. У разі правильного введення суми, натисніть «ТАК», сума буде проведена і винагороду буде нараховано учаснику системи лояльності.
-
-Якщо сума введена з помилкою, натисніть «НІ» і Ви повернетеся на крок введення суми і зможете її скорегувати.
-'''),
- "support_guide": MessageLookupByLibrary.simpleMessage('''
-Рекомендуйте покупцям встановити мобільний додаток дисконтної системи і отримуйте нових лояльних покупців.
-
-При некоректній роботі програми прохання відразу звернутися за телефоном нашої технічної підтримки.
-
-Телефон:\n%s\n
-Наш сайт:\n%s
-'''),
- "common_guide": MessageLookupByLibrary.simpleMessage('''
-Для ефективного зчитування штрих-коду карти учасника системи лояльності необхідно камеру сканера піднести так, щоб в неї не потрапляли вертикальні смуги рамки. Вони розцінюються сканером як частина штрих-коду.
-''')
- };
-}
diff --git a/lib/network.dart b/lib/network.dart
index 0def3df..ae0163e 100644
--- a/lib/network.dart
+++ b/lib/network.dart
@@ -1,6 +1,5 @@
-import 'package:checker/db.dart';
+import 'package:checker/strings.dart';
import 'package:flutter/services.dart';
-import 'package:intl/intl.dart';
import 'common.dart';
@@ -14,7 +13,7 @@ getCreateTokenRequest(Map httpBody) async {
return httpClient.post(
await getEndpoint() + 'tokens/?_dmapptoken=' + await getToken(),
body: httpBody,
- headers: {'Accept-Language': Intl.defaultLocale});
+ headers: {'Accept-Language': StringsLocalization.localeCode});
}
// Проверка статуса токена. В ответе приходит параметр active, который может быть либо true, либо false,.
@@ -25,21 +24,21 @@ getCheckTokenStatusRequest(String token) async {
token +
'?_dmapptoken=' +
await getToken(),
- headers: {'Accept-Language': Intl.defaultLocale});
+ headers: {'Accept-Language': StringsLocalization.localeCode});
}
// Удаление токена на сервере.
getDeleteTokenRequest(String token) async {
return httpClient.delete(
await getEndpoint() + 'tokens/' + token + '?_dmapptoken=' +
- await getToken(), headers: {'Accept-Language': Intl.defaultLocale});
+ await getToken(), headers: {'Accept-Language': StringsLocalization.localeCode});
}
getLoyaltyRequest(String endpoint, String token) async {
var headers = {
'DM-Authorization': 'dmapptoken ${await getToken()}',
'Authorization': 'dmtoken ${token}',
- 'Accept-Language': Intl.defaultLocale
+ 'Accept-Language': StringsLocalization.localeCode
};
return httpClient.get(endpoint, headers: headers);
@@ -50,7 +49,7 @@ getPurchaseRequest(String endpoint, Map body, String token) async {
var headers = {
'DM-Authorization': 'dmapptoken ${await getToken()}',
'Authorization': 'dmtoken ${token}',
- 'Accept-Language': Intl.defaultLocale
+ 'Accept-Language': StringsLocalization.localeCode
};
return httpClient.post(endpoint, body: body, headers: headers);
@@ -61,7 +60,7 @@ getCouponsRequest(String endpoint, String token) async {
var headers = {
'DM-Authorization': 'dmapptoken ${await getToken()}',
'Authorization': 'dmtoken ${token}',
- 'Accept-Language': Intl.defaultLocale
+ 'Accept-Language': StringsLocalization.localeCode
};
print(headers);
@@ -74,7 +73,7 @@ getUserByCard(String card, String token) async {
var headers = {
'DM-Authorization': 'dmapptoken ${await getToken()}',
'Authorization': 'dmtoken ${token}',
- 'Accept-Language': Intl.defaultLocale
+ 'Accept-Language': StringsLocalization.localeCode
};
@@ -89,7 +88,7 @@ getUserByPhone(String phone, String token) async {
var headers = {
'DM-Authorization': 'dmapptoken ${await getToken()}',
'Authorization': 'dmtoken ${token}',
- 'Accept-Language': Intl.defaultLocale
+ 'Accept-Language': StringsLocalization.localeCode
};
diff --git a/lib/screens/finish_registration.dart b/lib/screens/finish_registration.dart
index 7919515..a7da747 100644
--- a/lib/screens/finish_registration.dart
+++ b/lib/screens/finish_registration.dart
@@ -8,8 +8,6 @@ import 'package:checker/db.dart';
import 'package:checker/network.dart';
import 'package:checker/strings.dart';
import 'package:flutter/material.dart';
-import 'package:flutter/services.dart';
-import 'package:intl/intl.dart';
class FinishRegistrationScreen extends BaseScreen {
diff --git a/lib/screens/languages.dart b/lib/screens/languages.dart
index 4f101b9..e7d90c1 100644
--- a/lib/screens/languages.dart
+++ b/lib/screens/languages.dart
@@ -4,7 +4,6 @@ import 'package:checker/db.dart';
import 'package:flutter/material.dart';
import 'package:checker/strings.dart';
import 'package:checker/common.dart';
-import 'package:intl/intl.dart';
class LanguagesScreen extends BaseScreen {
@@ -39,14 +38,13 @@ class LanguagesState extends SettingsBaseState {
@override
saveOption() async {
await helper.saveLocale(languages[selectedItem]);
- Intl.defaultLocale = languages[selectedItem];
await StringsLocalization.load(languages[selectedItem]);
}
@override
void getSelectedValue() {
setState(() {
- selectedItem = getOptions().indexOf(getLocaleTitle(Intl.defaultLocale));
+ selectedItem = getOptions().indexOf(getLocaleTitle(StringsLocalization.localeCode));
});
}
-}
\ No newline at end of file
+}
diff --git a/lib/screens/settings.dart b/lib/screens/settings.dart
index 8786c2f..3a3d9ad 100644
--- a/lib/screens/settings.dart
+++ b/lib/screens/settings.dart
@@ -7,7 +7,6 @@ import 'package:checker/screens/currencies.dart';
import 'package:checker/screens/languages.dart';
import 'package:checker/strings.dart';
import 'package:flutter/material.dart';
-import 'package:intl/intl.dart';
class SettingsScreen extends BaseScreen {
@@ -51,7 +50,7 @@ class SettingsState extends BaseState {
menuItems[2].title = StringsLocalization.logout();
menuItems[0].selectedValue = info['currency'].toString();
menuItems[1].selectedValue =
- info['locale'] == null ? Intl.defaultLocale : info['locale'];
+ info['locale'] == null ? StringsLocalization.locale() : info['locale'];
menuItems[2].selectedValue =
info['token'] == null ? '' : getTokenSuffix(info['token']);
});
diff --git a/lib/screens/splash.dart b/lib/screens/splash.dart
index 2b52de8..3d42d10 100644
--- a/lib/screens/splash.dart
+++ b/lib/screens/splash.dart
@@ -11,10 +11,7 @@ import 'package:checker/screens/finish_registration.dart';
import 'package:checker/screens/registration.dart';
import 'package:checker/strings.dart';
import 'package:flutter/material.dart';
-import 'package:flutter/services.dart';
import 'package:http/http.dart';
-import 'package:intl/intl.dart';
-import 'package:xml/xml.dart' as xml;
class SplashScreen extends StatefulWidget {
@override
@@ -55,10 +52,8 @@ class _SplashScreenState extends BaseState {
helper.getSettings(false).then((settings) {
if (settings == null) {
createSettingsTable(locale);
- getTranslates(locale).then((strings) {
-// platform.invokeMethod('pushTranslates').then((locale) {
-//
-// });
+ StringsLocalization.load(locale).then((locale) {
+ print(locale);
});
} else {
initLocale(locale, () {
@@ -69,21 +64,6 @@ class _SplashScreenState extends BaseState {
});
}
- Future