Remove i18n package. Add xml files with strings to flutter assets. Create method for passing localized strings to channel.

This commit is contained in:
Ivan Murashov
2018-02-07 00:28:47 +03:00
parent 8c4287a21b
commit c15108fda9
40 changed files with 600 additions and 930 deletions

View File

@@ -1,3 +0,0 @@
<resources>
<string name="app_name">AutoBonus</string>
</resources>

View File

@@ -1,3 +0,0 @@
<resources>
<string name="app_name">AutoBonus</string>
</resources>

View File

@@ -1,3 +0,0 @@
<resources>
<string name="app_name">Dinect Crypto</string>
</resources>

View File

@@ -1,3 +0,0 @@
<resources>
<string name="app_name">Dinect Crypto</string>
</resources>

View File

@@ -1,3 +0,0 @@
<resources>
<string name="app_name">Dinect (INT)</string>
</resources>

View File

@@ -1,3 +0,0 @@
<resources>
<string name="app_name">Dinect (INT)</string>
</resources>

View File

@@ -1,3 +0,0 @@
<resources>
<string name="app_name">Dinect (OTE)</string>
</resources>

View File

@@ -1,3 +0,0 @@
<resources>
<string name="app_name">Dinect (OTE)</string>
</resources>

View File

@@ -1,3 +0,0 @@
<resources>
<string name="app_name">Dinect (STAGING)</string>
</resources>

View File

@@ -1,3 +0,0 @@
<resources>
<string name="app_name">Dinect (STAGING)</string>
</resources>

View File

@@ -1,3 +0,0 @@
<resources>
<string name="app_name">Dinect (TESTING)</string>
</resources>

View File

@@ -1,3 +0,0 @@
<resources>
<string name="app_name">Dinect (TESTING)</string>
</resources>

View File

@@ -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);
}

View File

@@ -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() {
}
}

View File

@@ -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" />
<EditText
android:id="@+id/manual_input"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:hint="@string/enter_manual"
android:imeOptions="actionDone"
android:inputType="text"
android:maxLines="1"
android:textColor="@android:color/white"
android:textColorHint="@android:color/white"/>
android:textColorHint="@android:color/white" />
</android.support.v7.widget.Toolbar>

View File

@@ -12,15 +12,15 @@
<group android:id="@+id/items"/>
<item android:id="@+id/settings"
android:title="@string/settings"
android:title="@null"
android:icon="@drawable/settings"/>
<item android:id="@+id/faq"
android:title="@string/faq"
android:title="@null"
android:icon="@drawable/help"/>
<item android:id="@+id/exit"
android:title="@string/exit"
android:title="@null"
android:icon="@drawable/exit"/>
</menu>

View File

@@ -1,12 +0,0 @@
<resources>
<string name="app_name">Dinect</string>
<string name="scanner_title">Сканер карты</string>
<string name="scan">Сканировать</string>
<string name="faq">Справка</string>
<string name="exit">Закрыть приложение</string>
<string name="settings">Настройки</string>
<string name="identifier_not_found">"Идентификатор %s не найден"</string>
<string name="enter_manual">Введите номер карты</string>
<string name="enter_phone">Телефон 79XXXXXXXXX</string>
<string name="error_contact_support">Можете воспользоваться ручным вводом или позвонить на номер:%s</string>
</resources>

View File

@@ -1,12 +0,0 @@
<resources>
<string name="app_name">Dinect</string>
<string name="scanner_title">Сканер карти</string>
<string name="scan">Сканувати</string>
<string name="faq">Допомога</string>
<string name="exit">Закрыть приложение</string>
<string name="settings">Налаштування</string>
<string name="identifier_not_found">"Ідентифікатор %s не знайден"</string>
<string name="enter_manual">Введіть штрихкод вручну</string>
<string name="enter_phone">Телефон 79XXXXXXXXX</string>
<string name="error_contact_support">Можете скористатися ручним введенням або зателефонувати на номер:\n%s</string>
</resources>

View File

@@ -1,12 +1,3 @@
<resources>
<string name="app_name">Dinect</string>
<string name="scanner_title">Card Scanner</string>
<string name="scan">Scan</string>
<string name="faq">Help</string>
<string name="exit">Exit</string>
<string name="settings">Settings</string>
<string name="identifier_not_found">"Identifier %s is not found"</string>
<string name="enter_manual">Enter the card number</string>
<string name="enter_phone">Phone 79XXXXXXXXX</string>
<string name="error_contact_support">You can use manual input or call the number:\n%s</string>
</resources>

View File

@@ -1,3 +0,0 @@
<resources>
<string name="app_name">PIP</string>
</resources>

View File

@@ -1,3 +0,0 @@
<resources>
<string name="app_name">PIP</string>
</resources>

View File

@@ -0,0 +1,113 @@
<resources>
<string name="app_name">Dinect</string>
<string name="scanner_title">Card Scanner</string>
<string name="scan">Scan</string>
<string name="faq">Help</string>
<string name="exit">Exit</string>
<string name="settings">Settings</string>
<string name="identifier_not_found">"Identifier %s is not found"</string>
<string name="enter_manual">Enter the card number</string>
<string name="enter_phone">Phone 79XXXXXXXXX</string>
<string name="error_contact_support">You can use manual input or call the number:\n%s</string>
<string name="ID_Store">Store ID</string>
<string name="ID_not_found">Identifier %s is not found</string>
<string name="app_activ">The application is activated</string>
<string name="ask_change_store">Do you really want to log out and enter a different store number?</string>
<string name="buyer">Buyer</string>
<string name="card">Card</string>
<string name="card_scaner">Card Scanner</string>
<string name="carry_purchase">Create a purchase</string>
<string name="complite_activ">Complete registration</string>
<string name="complite_purchase">Complete the purchase</string>
<string name="confirm_purchase">You confirm the purchase for %s %s</string>
<string name="confirmation">Сonfirmation</string>
<string name="no">No</string>
<string name="purchase_complite">A purchase of %s %s was completed</string>
<string name="registration">Registration</string>
<string name="usage">Usage</string>
<string name="support">Support contacts</string>
<string name="common">General information</string>
<string name="request_sent_wait_activ">Activation request for the application has been sent, please wait for administrator approval</string>
<string name="reward">Reward</string>
<string name="bonus">Bonus on account</string>
<string name="discount_rate">Dicount Rate</string>
<string name="discount_sum">Dicount Sum</string>
<string name="bonus_plus">Bonus points</string>
<string name="bonus_minus">Bonus was charged</string>
<string name="bonus_hint">Points to charge</string>
<string name="coupons_used">Coupons were used</string>
<string name="select_coupons">Select coupons for using in purchase</string>
<string name="bonus_explanation">If not set, points will be added</string>
<string name="scan">Scan</string>
<string name="sign_up">Sign Up</string>
<string name="specify_din_store">Specify the store ID</string>
<string name="sum">Sum</string>
<string name="update_activ_status">Update activation status</string>
<string name="yes">Yes</string>
<string name="settings">Settings</string>
<string name="help">Help</string>
<string name="exit">Exit</string>
<string name="logout">Log Out</string>
<string name="currency">Currency</string>
<string name="locale">Language</string>
<string name="nominative_ruble">Ruble</string>
<string name="singular_ruble">Ruble</string>
<string name="plural_ruble">Rubles</string>
<string name="nominative_dollar">US Dollar</string>
<string name="singular_dollar">US Dollar</string>
<string name="plural_dollar">US Dollars</string>
<string name="nominative_hryvna">Hryvnia</string>
<string name="singular_hryvna">Hryvnia</string>
<string name="plural_hryvna">Hryvnia</string>
<string name="nominative_tenge">Tenge</string>
<string name="singular_tenge">Tenge</string>
<string name="plural_tenge">Tenge</string>
<string name="nominative_euro">Euro</string>
<string name="singular_euro">Euro</string>
<string name="plural_euro">Euro</string>
<string name="registration_guide">
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".
</string>
<string name="usage_guide">
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.
</string>
<string name="support_guide">
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
</string>
<string name="common_guide">
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.
</string>
</resources>

View File

@@ -0,0 +1,105 @@
<resources>
<string name="ID_Store">ID del negocio</string>
<string name="ID_not_found">ID %s no está encontrado</string>
<string name="app_activ">Aplicación está activada</string>
<string name="ask_change_store">Os realmente quiereis acabarse una sesión y dar otro DIN del negocio</string>
<string name="buyer">El comprador</string>
<string name="card">Tarjeta</string>
<string name="card_scaner">El escaneo de tarjeta</string>
<string name="carry_purchase">Realizar la compra</string>
<string name="complite_activ">Terminar el registro</string>
<string name="complite_purchase">Terminar la compra</string>
<string name="confirm_purchase">Confirmais la compra por %s %s</string>
<string name="confirmation">Confirmacón</string>
<string name="no">No</string>
<string name="purchase_complite">La compra por %s %s está realizada</string>
<string name="registration">El registro</string>
<string name="usage">Explotación</string>
<string name="support">Los contactos del soporte técnico</string>
<string name="request_sent_wait_activ">El requieremento de activación de aplicación esta mandado, esperad la activación por el administrador</string>
<string name="reward">Gratificación</string>
<string name="bonus">Bono por cuenta</string>
<string name="discount_rate">Tasa de descuento</string>
<string name="discount_sum">El monto del descuento</string>
<string name="bonus_plus">Puntos de bonificación</string>
<string name="bonus_minus">El bono fue cobrado</string>
<string name="bonus_hint">Cuántas puntuaciones se cancelan</string>
<string name="coupons_used">Los cupones fueron canjeados</string>
<string name="bonus_explanation">Si no especifica cuántos puntos cancelar, se agregarán puntos</string>
<string name="scan">Escanear</string>
<string name="sign_up">Registrarse</string>
<string name="specify_din_store">Hay que dar ID del negocio</string>
<string name="sum">Suma</string>
<string name="update_activ_status">Actualizar la condición de activación</string>
<string name="user_name">Un nombre de usario</string>
<string name="yes">Si</string>
<string name="settings">Las configuraciones</string>
<string name="help">La Ayuda</string>
<string name="exit">Salir</string>
<string name="logout">Log Out</string>
<string name="currency">La Moneda</string>
<string name="locale">La lengua</string>
<string name="nominative_ruble">Rublo</string>
<string name="singular_ruble">Rublo</string>
<string name="plural_ruble">Rublos</string>
<string name="nominative_dollar">Dólar Dolares</string>
<string name="singular_dollar">Dólar Dolares</string>
<string name="plural_dollar">Dólar Dolares</string>
<string name="nominative_hryvna">Hryvnia</string>
<string name="singular_hryvna">Hryvnia</string>
<string name="plural_hryvna">Hryvnia</string>
<string name="nominative_tenge">Tenge</string>
<string name="singular_tenge">Tenge</string>
<string name="plural_tenge">Tenge</string>
<string name="nominative_euro">Euro</string>
<string name="singular_euro">Euro</string>
<string name="plural_euro">Euro</string>
<string name="registration_guide">
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".
</string>
<string name="usage_guide">
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.
</string>
<string name="support_guide">
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
</string>
<string name="common_guide">
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.</string>
</resources>

View File

@@ -1,12 +1,112 @@
<resources>
<string name="app_name">Dinect</string>
<string name="scanner_title">Сканер карты</string>
<string name="scan">Сканировать</string>
<string name="faq">Справка</string>
<string name="exit">Закрыть приложение</string>
<string name="settings">Настройки</string>
<string name="identifier_not_found">"Идентификатор %s не найден"</string>
<string name="enter_manual">Введите номер карты</string>
<string name="enter_phone">Телефон 79XXXXXXXXX</string>
<string name="error_contact_support">Можете воспользоваться ручным вводом или позвонить на номер:%s</string>
<string name="app_name">Dinect</string>
<string name="scanner_title">Сканер карты</string>
<string name="scan">Сканировать</string>
<string name="faq">Справка</string>
<string name="exit">Закрыть приложение</string>
<string name="settings">Настройки</string>
<string name="identifier_not_found">"Идентификатор %s не найден"</string>
<string name="enter_manual">Введите номер карты</string>
<string name="enter_phone">Телефон 79XXXXXXXXX</string>
<string name="error_contact_support">Можете воспользоваться ручным вводом или позвонить на номер:%s</string>
<string name="ID_Store">ID магазина</string>
<string name="ID_not_found">Идентификатор %s не найден</string>
<string name="app_activ">Приложение активировано</string>
<string name="ask_change_store">Вы действительно хотите выйти и ввести другой номер магазина?</string>
<string name="buyer">Покупатель</string>
<string name="card">Карта</string>
<string name="card_scaner">Сканер карты</string>
<string name="carry_purchase">Проведение покупки</string>
<string name="complite_activ">Завершить регистрацию</string>
<string name="complite_purchase">Завершить покупку</string>
<string name="confirm_purchase">Вы подтверждаете покупку на %s %s</string>
<string name="confirmation">Подтверждение</string>
<string name="no">Нет</string>
<string name="purchase_complite">Покупка на сумму %s %s проведена</string>
<string name="registration">Регистрация</string>
<string name="usage">Использование</string>
<string name="support">Контакты поддержки</string>
<string name="common">Общая информация</string>
<string name="request_sent_wait_activ">Запрос на активацию приложения отправлен, дождитесь подтверждения активации администратором</string>
<string name="reward">Вознаграждение</string>
<string name="bonus">Бонусов на счету</string>
<string name="discount_rate">Процент скидки</string>
<string name="discount_sum">Сумма скидки</string>
<string name="bonus_plus">Бонусов начислено</string>
<string name="bonus_minus">Бонусов списано</string>
<string name="bonus_hint">Сколько баллов списать?</string>
<string name="coupons_used">Были погашены купоны</string>
<string name="select_coupons">Выберите купоны для гашения</string>
<string name="bonus_explanation">Если не указано сколько баллов списать, баллы будут начислены</string>
<string name="scan">Сканировать</string>
<string name="sign_up">Зарегистрироваться</string>
<string name="specify_din_store">Необходимо указать ID магазина</string>
<string name="sum">Сумма</string>
<string name="update_activ_status">Обновить статус активации</string>
<string name="yes">Да</string>
<string name="settings">Настройки</string>
<string name="help">Справка</string>
<string name="exit">Закрыть приложение</string>
<string name="logout">Выйти из аккаунта</string>
<string name="currency">Валюта</string>
<string name="locale">Язык</string>
<string name="nominative_ruble">Рубль</string>
<string name="singular_ruble">Рубля</string>
<string name="plural_ruble">Рублей</string>
<string name="nominative_dollar">Доллар США</string>
<string name="singular_dollar">Доллара США</string>
<string name="plural_dollar">Долларов США</string>
<string name="nominative_hryvna">Гривна</string>
<string name="singular_hryvna">Гривны</string>
<string name="plural_hryvna">Гривен</string>
<string name="nominative_tenge">Тенге</string>
<string name="singular_tenge">Тенге</string>
<string name="plural_tenge">Тенге</string>
<string name="nominative_euro">Евро</string>
<string name="singular_euro">Евро</string>
<string name="plural_euro">Евро</string>
<string name="registration_guide">
После запуска приложения вы окажетесь на странице регистрации магазина.
Введите ID код магазина (выдается при подключении к системе лояльности)
Кликните по кнопке: «Зарегистрировать»
Дождитесь подтверждение активации программы, нажатием по кнопке «Обновите статус активации» обновите статус.
После подтверждения запроса на активацию программы Партнером/менеджером кликните по кнопке «Завершить регистрацию», приложение готово к использованию.
При желании изменить ID магазина, необходимо нажать на кнопку Меню (верхний правый угол экрана) и выбрать "Выход".
</string>
<string name="usage_guide">
Шаг 1:
Запустите приложение для сканирования карты участника системы лояльности.
При успешном сканировании на вашем экране появятся данные покупателя.
Шаг 2:
Введите сумму покупки данного покупателя и нажмите на кнопку «Проведение покупки».
Во всплывающем окне нажмите ""ДА"", для подтверждения суммы покупки
Если вы хотите поправить сумму, нажмите «НЕТ» и Вы вернетесь на экран покупки и сможете её скорректировать.
</string>
<string name="support_guide">
Рекомендуйте покупателям установить мобильное приложение дисконтной системы и получайте новых лояльных покупателей.
При некорректной работе приложения просьба сразу обратиться по телефону нашей технической поддержки.
Телефон:
%s
Наш сайт:
%s
</string>
<string name="common_guide">
Для эффективного считывания штрих-кода карты участника системы лояльности необходимо камеру сканера поднести так, чтобы в неё не попадали вертикальные полосы рамки (если они есть). Они расцениваются сканером как часть штрих-кода.
</string>
</resources>

View File

@@ -1,12 +1,109 @@
<resources>
<string name="app_name">Dinect</string>
<string name="scanner_title">Сканер карти</string>
<string name="scan">Сканувати</string>
<string name="faq">Допомога</string>
<string name="exit">Закрыть приложение</string>
<string name="settings">Налаштування</string>
<string name="identifier_not_found">"Ідентифікатор %s не знайден"</string>
<string name="enter_manual">Введіть штрихкод вручну</string>
<string name="enter_phone">Телефон 79XXXXXXXXX</string>
<string name="error_contact_support">Можете скористатися ручним введенням або зателефонувати на номер:\n%s</string>
<string name="app_name">Dinect</string>
<string name="scanner_title">Сканер карти</string>
<string name="scan">Сканувати</string>
<string name="faq">Допомога</string>
<string name="exit">Закрыть приложение</string>
<string name="settings">Налаштування</string>
<string name="identifier_not_found">"Ідентифікатор %s не знайден</string>
<string name="enter_manual">Введіть штрихкод вручну</string>
<string name="enter_phone">Телефон 79XXXXXXXXX</string>
<string name="error_contact_support">Можете скористатися ручним введенням або зателефонувати на номер:\n%s</string>
<string name="ID_Store">ID магазину</string>
<string name="ID_not_found">Ідентифікатор %s не знайден</string>
<string name="app_activ">Додаток активований</string>
<string name="ask_change_store">Ви дійсно хочете вийти і ввести інший номер магазину</string>
<string name="buyer">Покупець</string>
<string name="card">Карта</string>
<string name="card_scaner">Сканер карти</string>
<string name="carry_purchase">Проведення покупки</string>
<string name="complite_activ">Завершити реєстрацію</string>
<string name="complite_purchase">Завершити купівлю</string>
<string name="confirm_purchase">Ви підтверджуєте покупку на %s %s</string>
<string name="confirmation">Підтвердження</string>
<string name="no">Ні</string>
<string name="purchase_complite">Купівля на суму %s %s проведена</string>
<string name="registration">Реєстрація</string>
<string name="usage">Використання</string>
<string name="support">Контакти підтримки</string>
<string name="common">Загальна інформація</string>
<string name="request_sent_wait_activ">Запит на активацію додатку відправлений, дочекайтеся підтвердження активації адміністратором</string>
<string name="reward">Винагорода</string>
<string name="bonus">Бонусів на рахунку</string>
<string name="discount_rate">Відсоток знижки</string>
<string name="discount_sum">Сума знижки</string>
<string name="bonus_plus">Бонусів нараховано</string>
<string name="bonus_minus">Бонусів списано</string>
<string name="bonus_hint">Скільки балів списати?</string>
<string name="coupons_used">Були погашені купони</string>
<string name="bonus_explanation">Якщо не вказано скільки балів списати, бали будуть нараховані</string>
<string name="scan">Сканувати</string>
<string name="sign_up">Зареєструватися</string>
<string name="specify_din_store">Необхідно вказати ID магазину</string>
<string name="sum">Сума</string>
<string name="update_activ_status">Оновити статус активації</string>
<string name="yes">Так</string>
<string name="settings">Налаштування</string>
<string name="help">Допомога</string>
<string name="exit">Вихід</string>
<string name="logout">Log Out</string>
<string name="currency">Валюта</string>
<string name="locale">Мова</string>
<string name="nominative_ruble">Рубль</string>
<string name="singular_ruble">Рубль</string>
<string name="plural_ruble">Рубль</string>
<string name="nominative_dollar">Доллар США</string>
<string name="singular_dollar">Доллар США</string>
<string name="plural_dollar">Доллар США</string>
<string name="nominative_hryvna">Гривня</string>
<string name="singular_hryvna">Гривня</string>
<string name="plural_hryvna">Гривня</string>
<string name="nominative_tenge">Тенге</string>
<string name="singular_tenge">Тенге</string>
<string name="plural_tenge">Тенге</string>
<string name="nominative_euro">Євро</string>
<string name="singular_euro">Євро</string>
<string name="plural_euro">Євро</string>
<string name="registration_guide">
Після запуску програми ви опинитеся на сторінці реєстрації магазина.
Введіть DIN код магазину (видається при підключенні до системи лояльності)
Натисніть на кнопку «Зареєструвати»
Дочекайтеся підтвердження активації програми, натисканням на кнопку «Оновлення статус активації» поновіть статус.
    
Після підтвердження запиту на активацію програми Партнером / менеджером клікніть по кнопці «Завершити реєстрацію», додаток готове до використання.
При бажанні змінити номер каси, необхідно натиснути на кнопку Меню (верхній правий кут екрану) і вибрати "Вихід".
</string>
<string name="usage_guide">
Крок 1:
    
При пред'явленні покупцем картки учасника системи лояльності, запустіть цю програму.
На екрані з'явиться сканер штрих кодів. Відскануте штрих-код карти сканером.
При успішному скануванні на вашому екрані з'являться дані покупця.
    
Крок 2:
    
Необхідно ввести суму покупки даного покупця і клікнути на кнопку «Проведення покупки».
Спливе вікно підтвердження правильності введення суми. У разі правильного введення суми, натисніть «ТАК», сума буде проведена і винагороду буде нараховано учаснику системи лояльності.
Якщо сума введена з помилкою, натисніть «НІ» і Ви повернетеся на крок введення суми і зможете її скорегувати.
</string>
<string name="support_guide">
Рекомендуйте покупцям встановити мобільний додаток дисконтної системи і отримуйте нових лояльних покупців.
При некоректній роботі програми прохання відразу звернутися за телефоном нашої технічної підтримки.
Телефон:
%s
Наш сайт:
%s
</string>
<string name="common_guide">
Для ефективного зчитування штрих-коду карти учасника системи лояльності необхідно камеру сканера піднести так, щоб в неї не потрапляли вертикальні смуги рамки. Вони розцінюються сканером як частина штрих-коду.
</string>
</resources>

View File

@@ -4,7 +4,8 @@ import 'package:checker/db.dart';
import 'package:checker/strings.dart';
import 'package:flutter/material.dart';
abstract class SettingsBaseState<T extends StatefulWidget> extends BaseState<T> {
abstract class SettingsBaseState<T extends StatefulWidget>
extends BaseState<T> {
SettingsBaseState(SqliteHelper helper, String app) {
this.helper = helper;
@@ -15,7 +16,7 @@ abstract class SettingsBaseState<T extends StatefulWidget> extends BaseState<T>
@override Widget build(BuildContext context) {
return new Scaffold(appBar: getAppBar(),
body: getScreenContent());
body: getScreenContent());
}
@override
@@ -43,26 +44,27 @@ abstract class SettingsBaseState<T extends StatefulWidget> extends BaseState<T>
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: <Widget>[
new Expanded(child: new Text(option)),
getCheckMark(getOptions().indexOf(option))]))));
selectedItem = getOptions().indexOf(option);
});
},
child: new Row(children: <Widget>[
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();
}
}
}

View File

@@ -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<String, String> 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);
}
}
}

View File

@@ -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<dynamic> LibraryLoader();
Map<String, LibraryLoader> _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);
}

View File

@@ -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.''')
};
}

View File

@@ -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.''')
};
}

View File

@@ -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('''
Для эффективного считывания штрих-кода карты участника системы лояльности необходимо камеру сканера поднести так, чтобы в неё не попадали вертикальные полосы рамки (если они есть). Они расцениваются сканером как часть штрих-кода.
''')
};
}

View File

@@ -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('''
Для ефективного зчитування штрих-коду карти учасника системи лояльності необхідно камеру сканера піднести так, щоб в неї не потрапляли вертикальні смуги рамки. Вони розцінюються сканером як частина штрих-коду.
''')
};
}

View File

@@ -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
};

View File

@@ -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 {

View File

@@ -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<LanguagesScreen> {
@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));
});
}
}
}

View File

@@ -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<SettingsScreen> {
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']);
});

View File

@@ -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<SplashScreen> {
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<SplashScreen> {
});
}
Future<Map> getTranslates(String locale) async {
String strings = await loadAsset(locale);
var document = xml.parse(strings);
Map results = new Map<String, String>();
document.findAllElements('string').forEach((node) {
print(node.name.toString() + node.text.toString());
results[node.name.toString()] = node.text.toString();
});
return results;
}
Future<String> loadAsset(String locale) async {
return await rootBundle.loadString('assets/values-$locale/strings.xml');
}
void initWithSavedValue(String locale) {
initLocale(locale, () {
showNext();
@@ -100,7 +80,6 @@ class _SplashScreenState extends BaseState<SplashScreen> {
}
void initLocale<T>(String locale, Future<T> onValue()) {
Intl.defaultLocale = locale;
StringsLocalization.load(locale).then((_) {
onValue();
});

View File

@@ -1,18 +1,33 @@
import 'package:intl/intl.dart';
import 'i18n/messages_all.dart';
import 'package:sprintf/sprintf.dart';
import 'dart:async';
import 'package:sprintf/sprintf.dart';
import 'package:xml/xml.dart' as xml;
import 'package:flutter/services.dart';
class StringsLocalization {
static String localeCode;
static Map<String, String> strings = new Map<String, String>();
static Future load(String locale) async {
return initializeMessages(locale);
localeCode = locale;
var document = xml.parse(await loadStrings(locale));
strings.clear();
document.findAllElements('string').forEach((node) {
strings[node.attributes[0].value] = node.text.toString();
});
return strings;
}
static String declineCurrency(int num, int code) {
static Future<String> loadStrings(String locale) async {
return await rootBundle.loadString('assets/values-$locale/strings.xml');
}
static String declineCurrency(int num, int code) {
int residual = num % 100;
if (residual >= 20) {
if (residual >= 20) {
residual %= 10;
}
@@ -31,7 +46,6 @@ class StringsLocalization {
}
static List<String> currencies(int code) {
String nominative, singular, plural;
switch (code) {
@@ -62,88 +76,76 @@ class StringsLocalization {
break;
}
return [nominative, singular, plural];
}
static String confirmPurchase(String val, int code) {
String trimmedVal =val.substring(0, val.length - 3);
return sprintf(Intl.message('confirm_purchase', name: 'confirm_purchase', locale: Intl.defaultLocale), [val, declineCurrency(int.parse(trimmedVal), code)]);
String trimmedVal = val.substring(0, val.length - 3);
return sprintf(strings['confirm_purchase'], [val, declineCurrency(int.parse(trimmedVal), code)]);
}
static String purchaseCompleted(String val, int code) {
String trimmedVal =val.substring(0, val.length - 3);
return sprintf(Intl.message('purchase_complite', name: 'purchase_complite', locale: Intl.defaultLocale), [val, declineCurrency(int.parse(trimmedVal), code)]);
String trimmedVal = val.substring(0, val.length - 3);
return sprintf(strings['purchase_complite'], [val, declineCurrency(int.parse(trimmedVal), code)]);
}
static String registration() => Intl.message('registration', name: 'registration', locale: Intl.defaultLocale);
static String usage() => Intl.message('usage', name: 'usage', locale: Intl.defaultLocale);
static String support() => Intl.message('support', name: 'support', locale: Intl.defaultLocale);
static String common() => Intl.message('common', name: 'common', locale: Intl.defaultLocale);
static String idStore() => Intl.message('ID_Store', name: 'ID_Store', locale: Intl.defaultLocale);
static String signUp() => Intl.message('sign_up', name: 'sign_up', locale: Intl.defaultLocale);
static String specifyDinStore() => Intl.message('specify_din_store', name: 'specify_din_store', locale: Intl.defaultLocale);
static String confirmation() => Intl.message('confirmation', name: 'confirmation', locale: Intl.defaultLocale);
static String askChangeStore() => Intl.message('ask_change_store', name: 'ask_change_store', locale: Intl.defaultLocale);
static String yes() => Intl.message('yes', name: 'yes', locale: Intl.defaultLocale);
static String no() => Intl.message('no', name: 'no', locale: Intl.defaultLocale);
static String requestSentWaitActivation() => Intl.message('request_sent_wait_activ', name: 'request_sent_wait_activ', locale: Intl.defaultLocale);
static String refreshActivationStatus() => Intl.message('update_activ_status', name: 'update_activ_status', locale: Intl.defaultLocale);
static String appActivated() => Intl.message('app_activ', name: 'app_activ', locale: Intl.defaultLocale);
static String completeRegistration() => Intl.message('complite_activ', name: 'complite_activ', locale: Intl.defaultLocale);
static String cardScanner() => Intl.message('card_scaner', name: 'card_scaner', locale: Intl.defaultLocale);
static String card() => Intl.message('card', name: 'card', locale: Intl.defaultLocale);
static String reward() => Intl.message('reward', name: 'reward', locale: Intl.defaultLocale);
static String sum() => Intl.message('sum', name: 'sum', locale: Intl.defaultLocale);
static String bonus() => Intl.message('bonus', name: 'bonus', locale: Intl.defaultLocale);
static String couponsUsed() => Intl.message('coupons_used', name: 'coupons_used', locale: Intl.defaultLocale);
static String selectCoupons() => Intl.message('select_coupons', name: 'select_coupons', locale: Intl.defaultLocale);
static String carryingPurchase() => Intl.message('carry_purchase', name: 'carry_purchase', locale: Intl.defaultLocale);
static String completePurchase() => Intl.message('complite_purchase', name: 'complite_purchase', locale: Intl.defaultLocale);
static String scan() => Intl.message('scan', name: 'scan', locale: Intl.defaultLocale);
static String buyer() => Intl.message('buyer', name: 'buyer', locale: Intl.defaultLocale);
static String bonusHint() => Intl.message('bonus_hint', name: 'bonus_hint', locale: Intl.defaultLocale);
static String bonusExplanation() => Intl.message('bonus_explanation', name: 'bonus_explanation', locale: Intl.defaultLocale);
static String discountRate() => Intl.message('discount_rate', name: 'discount_rate', locale: Intl.defaultLocale);
static String discountSum() => Intl.message('discount_sum', name: 'discount_sum', locale: Intl.defaultLocale);
static String bonusPlus() => Intl.message('bonus_plus', name: 'bonus_plus', locale: Intl.defaultLocale);
static String bonusMinus() => Intl.message('bonus_minus', name: 'bonus_minus', locale: Intl.defaultLocale);
static String idNotFound() => Intl.message('ID_not_found', name: 'ID_not_found', locale: Intl.defaultLocale);
static String settings() => Intl.message('settings', name: 'settings', locale: Intl.defaultLocale);
static String help() => Intl.message('help', name: 'help', locale: Intl.defaultLocale);
static String exit() => Intl.message('exit', name: 'exit', locale: Intl.defaultLocale);
static String logout() => Intl.message('logout', name: 'logout', locale: Intl.defaultLocale);
static String currency() => Intl.message('currency', name: 'currency', locale: Intl.defaultLocale);
static String locale() => Intl.message('locale', name: 'locale', locale: Intl.defaultLocale);
// Валюты
static String nominativeRuble() => Intl.message('nominative_ruble', name: 'nominative_ruble', locale: Intl.defaultLocale);
static String singularRuble() => Intl.message('singular_ruble', name: 'singular_ruble', locale: Intl.defaultLocale);
static String pluralRuble() => Intl.message('plural_ruble', name: 'plural_ruble', locale: Intl.defaultLocale);
static String nominativeEuro() => Intl.message('nominative_euro', name: 'nominative_euro', locale: Intl.defaultLocale);
static String singularEuro() => Intl.message('singular_euro', name: 'singular_euro', locale: Intl.defaultLocale);
static String pluralEuro() => Intl.message('plural_euro', name: 'plural_euro', locale: Intl.defaultLocale);
static String nominativeDollar() => Intl.message('nominative_dollar', name: 'nominative_dollar', locale: Intl.defaultLocale);
static String singularDollar() => Intl.message('singular_dollar', name: 'singular_dollar', locale: Intl.defaultLocale);
static String pluralDollar() => Intl.message('plural_dollar', name: 'plural_dollar', locale: Intl.defaultLocale);
static String nominativeHryvna() => Intl.message('nominative_hryvna', name: 'nominative_hryvna', locale: Intl.defaultLocale);
static String singularHryvna() => Intl.message('singular_hryvna', name: 'singular_hryvna', locale: Intl.defaultLocale);
static String pluralHryvna() => Intl.message('plural_hryvna', name: 'plural_hryvna', locale: Intl.defaultLocale);
static String nominativeTenge() => Intl.message('nominative_tenge', name: 'nominative_tenge', locale: Intl.defaultLocale);
static String singularTenge() => Intl.message('singular_tenge', name: 'singular_tenge', locale: Intl.defaultLocale);
static String pluralTenge() => Intl.message('plural_tenge', name: 'plural_tenge', locale: Intl.defaultLocale);
static String registrationGuide() => Intl.message('registration_guide', name: 'registration_guide', locale: Intl.defaultLocale);
static String usageGuide() => Intl.message('usage_guide', name: 'usage_guide', locale: Intl.defaultLocale);
static String commonGuide() => Intl.message('common_guide', name: 'common_guide', locale: Intl.defaultLocale);
static String supportGuide(String phone, String url) {
return sprintf(Intl.message('support_guide', name: 'support_guide', locale: Intl.defaultLocale), [phone, url]);
}
static String registration() => strings['registration'];
static String usage() => strings['usage'];
static String support() => strings['support'];
static String common() => strings['common'];
static String idStore() => strings['ID_Store'];
static String signUp() => strings['sign_up'];
static String specifyDinStore() => strings['specify_din_store'];
static String confirmation() => strings['confirmation'];
static String askChangeStore() => strings['ask_change_store'];
static String yes() => strings['yes'];
static String no() => strings['no'];
static String requestSentWaitActivation() => strings['request_sent_wait_activ'];
static String refreshActivationStatus() => strings['update_activ_status'];
static String appActivated() => strings['app_activ'];
static String completeRegistration() => strings['complite_activ'];
static String cardScanner() => strings['card_scaner'];
static String card() => strings['card'];
static String reward() => strings['reward'];
static String sum() => strings['sum'];
static String bonus() => strings['bonus'];
static String couponsUsed() => strings['coupons_used'];
static String selectCoupons() => strings['select_coupons'];
static String carryingPurchase() => strings['carry_purchase'];
static String completePurchase() => strings['complite_purchase'];
static String scan() => strings['scan'];
static String buyer() => strings['buyer'];
static String bonusHint() => strings['bonus_hint'];
static String bonusExplanation() => strings['bonus_explanation'];
static String discountRate() => strings['discount_rate'];
static String discountSum() => strings['discount_sum'];
static String bonusPlus() => strings['bonus_plus'];
static String bonusMinus() => strings['bonus_minus'];
static String idNotFound() => strings['ID_not_found'];
static String settings() => strings['settings'];
static String help() => strings['help'];
static String exit() => strings['exit'];
static String logout() => strings['logout'];
static String currency() => strings['currency'];
static String locale() => strings['locale'];
static String nominativeRuble() => strings['nominative_ruble'];
static String singularRuble() => strings['singular_ruble'];
static String pluralRuble() => strings['plural_ruble'];
static String nominativeEuro() => strings['nominative_euro'];
static String singularEuro() => strings['singular_euro'];
static String pluralEuro() => strings['plural_euro'];
static String nominativeDollar() => strings['nominative_dollar'];
static String singularDollar() => strings['singular_dollar'];
static String pluralDollar() => strings['plural_dollar'];
static String nominativeHryvna() => strings['nominative_hryvna'];
static String singularHryvna() => strings['singular_hryvna'];
static String pluralHryvna() => strings['plural_hryvna'];
static String nominativeTenge() => strings['nominative_tenge'];
static String singularTenge() => strings['singular_tenge'];
static String pluralTenge() => strings['plural_tenge'];
static String registrationGuide() => strings['registration_guide'];
static String usageGuide() => strings['usage_guide'];
static String commonGuide() => strings['common_guide'].replaceAll('\n', "\n");
static String supportGuide(String phone, String url) => sprintf(strings['support_guide'], [phone, url]);
}

View File

@@ -1,20 +1,6 @@
# Generated by pub
# See http://pub.dartlang.org/doc/glossary.html#lockfile
packages:
analyzer:
dependency: transitive
description:
name: analyzer
url: "https://pub.dartlang.org"
source: hosted
version: "0.30.0+4"
args:
dependency: transitive
description:
name: args
url: "https://pub.dartlang.org"
source: hosted
version: "0.13.7"
async:
dependency: transitive
description:
@@ -22,13 +8,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.3"
barback:
dependency: transitive
description:
name: barback
url: "https://pub.dartlang.org"
source: hosted
version: "0.15.2+14"
charcode:
dependency: transitive
description:
@@ -36,13 +15,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.1"
cli_util:
dependency: transitive
description:
name: cli_util
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.2+1"
collection:
dependency: transitive
description:
@@ -50,60 +22,11 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.14.5"
convert:
dependency: transitive
description:
name: convert
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.1"
crypto:
dependency: transitive
description:
name: crypto
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.2+1"
csslib:
dependency: transitive
description:
name: csslib
url: "https://pub.dartlang.org"
source: hosted
version: "0.14.1"
dart_style:
dependency: transitive
description:
name: dart_style
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.9+1"
flutter:
dependency: "direct main"
description: flutter
source: sdk
version: "0.0.0"
front_end:
dependency: transitive
description:
name: front_end
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.0-alpha.4.1"
glob:
dependency: transitive
description:
name: glob
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.5"
html:
dependency: transitive
description:
name: html
url: "https://pub.dartlang.org"
source: hosted
version: "0.13.2+2"
http:
dependency: "direct main"
description:
@@ -125,41 +48,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.5"
intl:
dependency: "direct main"
description:
name: intl
url: "https://pub.dartlang.org"
source: hosted
version: "0.15.2"
intl_translation:
dependency: "direct main"
description:
name: intl_translation
url: "https://pub.dartlang.org"
source: hosted
version: "0.15.0"
isolate:
dependency: transitive
description:
name: isolate
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
kernel:
dependency: transitive
description:
name: kernel
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.0-alpha.1.1"
logging:
dependency: transitive
description:
name: logging
url: "https://pub.dartlang.org"
source: hosted
version: "0.11.3+1"
matcher:
dependency: transitive
description:
@@ -174,13 +62,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.1"
package_config:
dependency: transitive
description:
name: package_config
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.3"
path:
dependency: transitive
description:
@@ -202,20 +83,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.7.0"
plugin:
dependency: transitive
description:
name: plugin
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.0+2"
pool:
dependency: transitive
description:
name: pool
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.4"
sky_engine:
dependency: transitive
description: flutter
@@ -241,7 +108,7 @@ packages:
name: sqflite
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.2+1"
version: "0.6.2+2"
stack_trace:
dependency: transitive
description:
@@ -270,13 +137,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.4"
utf:
dependency: transitive
description:
name: utf
url: "https://pub.dartlang.org"
source: hosted
version: "0.9.0+3"
vector_math:
dependency: transitive
description:
@@ -284,13 +144,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.5"
watcher:
dependency: transitive
description:
name: watcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.9.7+6"
xml:
dependency: "direct main"
description:
@@ -298,12 +151,5 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.6.0"
yaml:
dependency: transitive
description:
name: yaml
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.13"
sdks:
dart: ">=2.0.0-dev.15.0 <=2.0.0-dev.19.0"

View File

@@ -3,8 +3,6 @@ description: A new Flutter project.
dependencies:
http: '>=0.11.3+12'
intl: '>=0.14.0 <0.16.0'
intl_translation: '>=0.14.0 <0.16.0'
sprintf: "^3.0.2"
path_provider: "^0.2.1+1"
sqflite: any
@@ -49,6 +47,8 @@ flutter:
- assets/splash_text.png
- assets/values-ru/strings.xml
- assets/values-ua/strings.xml
- assets/values-en/strings.xml
- assets/values-es/strings.xml
# To add assets from package dependencies, first ensure the asset
# is in the lib/ directory of the dependency. Then,