yuro_cli 0.1.1 yuro_cli: ^0.1.1 copied to clipboard
A sample command-line application.
// To install
pub global activate yuro_cli
flutter pub global activate yuro_cli
// generate images
yuro generate images
// generate locales
yuro generate locales
Generate Locale
en_US
文件
{
"locale": "English",
"locale_null": "Auto",
"themeMode_light": "Light",
"themeMode_dark": "Dark",
"themeMode_system": "System",
"setting": {
"title": "Setting",
"label": {
"account_security": "Account Security",
"themeMode": "Dark Mode",
"language": "Language",
"help_feedback": "Help & Feedback",
"about": "About"
},
"button": {
"logout": "Logout"
}
},
"theme_mode": {
"title": "Dark Mode",
"label": {
"system": "Auto",
"system_tips": "When enabled, Switch dark mode on/off to match your system settings",
"manual_mode": "Select manually"
}
},
"language": {
"title": "Language"
},
"about": {
"title": "About"
}
}
zh_CN
文件
{
"locale": "简体中文",
"locale_null": "跟随系统",
"themeMode_light": "浅色模式",
"themeMode_dark": "深色模式",
"themeMode_system": "跟随系统",
"home": {
"title": "首页"
},
"setting": {
"title": "设置",
"label": {
"account_security": "账号与安全",
"themeMode": "深色模式",
"language": "多语言",
"clear_cache": "清空缓存",
"help_feedback": "帮助与反馈",
"check_update": "检查更新",
"about": "关于"
},
"button": {
"logout": "退出登录"
}
},
"theme_mode": {
"title": "深色模式",
"label": {
"system": "跟随系统",
"system_tips": "开启后,将跟随系统打开或关闭深色模式",
"manual_mode": "手动模式"
}
},
"language": {
"title": "多语言"
},
"about": {
"title": "关于",
"label": {
"user_agreement": "用户协议",
"privacy_policy": "隐私权政策",
"official_website": "官方网址",
"contact_phone": "联系电话",
"contact_email": "联系邮箱"
}
}
}
生成代码
// DO NOT MODIFY MANUALLY. This code generate by package:yuro_cli/yuro_cli.dart.
import 'package:flutter/widgets.dart';
abstract class AppTranslation {
static final Map<String, Map<String, String>> translations = {
'en_US': Locales.en_US,
'zh_CN': Locales.zh_CN,
};
static const List<Locale> supportedLocales = [
Locale('en', 'US'),
Locale('zh', 'CN'),
];
}
abstract class LocaleKeys {
static const locale = 'locale';
static const locale_null = 'locale_null';
static const themeMode_light = 'themeMode_light';
static const themeMode_dark = 'themeMode_dark';
static const themeMode_system = 'themeMode_system';
static const setting_title = 'setting_title';
static const setting_label_account_security = 'setting_label_account_security';
static const setting_label_themeMode = 'setting_label_themeMode';
static const setting_label_language = 'setting_label_language';
static const setting_label_help_feedback = 'setting_label_help_feedback';
static const setting_label_about = 'setting_label_about';
static const setting_button_logout = 'setting_button_logout';
static const theme_mode_title = 'theme_mode_title';
static const theme_mode_label_system = 'theme_mode_label_system';
static const theme_mode_label_system_tips = 'theme_mode_label_system_tips';
static const theme_mode_label_manual_mode = 'theme_mode_label_manual_mode';
static const language_title = 'language_title';
static const about_title = 'about_title';
static const home_title = 'home_title';
static const setting_label_clear_cache = 'setting_label_clear_cache';
static const setting_label_check_update = 'setting_label_check_update';
static const about_label_user_agreement = 'about_label_user_agreement';
static const about_label_privacy_policy = 'about_label_privacy_policy';
static const about_label_official_website = 'about_label_official_website';
static const about_label_contact_phone = 'about_label_contact_phone';
static const about_label_contact_email = 'about_label_contact_email';
}
abstract class Locales {
static const en_US = {
'locale': 'English',
'locale_null': 'Auto',
'themeMode_light': 'Light',
'themeMode_dark': 'Dark',
'themeMode_system': 'System',
'setting_title': 'Setting',
'setting_label_account_security': 'Account Security',
'setting_label_themeMode': 'Dark Mode',
'setting_label_language': 'Language',
'setting_label_help_feedback': 'Help & Feedback',
'setting_label_about': 'About',
'setting_button_logout': 'Logout',
'theme_mode_title': 'Dark Mode',
'theme_mode_label_system': 'Auto',
'theme_mode_label_system_tips': 'When enabled, Switch dark mode on/off to match your system settings',
'theme_mode_label_manual_mode': 'Select manually',
'language_title': 'Language',
'about_title': 'About',
};
static const zh_CN = {
'locale': '简体中文',
'locale_null': '跟随系统',
'themeMode_light': '浅色模式',
'themeMode_dark': '深色模式',
'themeMode_system': '跟随系统',
'home_title': '首页',
'setting_title': '设置',
'setting_label_account_security': '账号与安全',
'setting_label_themeMode': '深色模式',
'setting_label_language': '多语言',
'setting_label_clear_cache': '清空缓存',
'setting_label_help_feedback': '帮助与反馈',
'setting_label_check_update': '检查更新',
'setting_label_about': '关于',
'setting_button_logout': '退出登录',
'theme_mode_title': '深色模式',
'theme_mode_label_system': '跟随系统',
'theme_mode_label_system_tips': '开启后,将跟随系统打开或关闭深色模式',
'theme_mode_label_manual_mode': '手动模式',
'language_title': '多语言',
'about_title': '关于',
'about_label_user_agreement': '用户协议',
'about_label_privacy_policy': '隐私权政策',
'about_label_official_website': '官方网址',
'about_label_contact_phone': '联系电话',
'about_label_contact_email': '联系邮箱',
};
}