Skip to content

Commit

Permalink
feat: using english as english (#205)
Browse files Browse the repository at this point in the history
  • Loading branch information
evan361425 authored May 18, 2024
1 parent c09dfc6 commit 03a1eea
Show file tree
Hide file tree
Showing 223 changed files with 8,754 additions and 4,496 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-to-playstore.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ jobs:
run: echo "$GOOGLE_SERVICES_JSON" > google-services.json
env:
GOOGLE_SERVICES_JSON: |
${{ secrets.GOOGLE_SERVICES_JSON }}
${{ needs.var.outputs.lane == 'internal' && secrets.GOOGLE_SERVICES_JSON_DEV || secrets.GOOGLE_SERVICES_JSON }}
working-directory: android/app

- name: Configure Keystore
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-candidate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ jobs:
- name: Configure Google Services
run: echo "$GOOGLE_SERVICES_JSON" > google-services.json
env:
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }}
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON_DEV }}
working-directory: android/app

- name: Configure Play Store
Expand All @@ -145,7 +145,7 @@ jobs:
# Build the application.
- name: Start building
run: |
flutter build -v apk --release --flavor dev
flutter build -v apk --release --flavor dev --dart-define=appFlavor=dev --dart-define=logLevel=info
mv build/app/outputs/flutter-apk/app-dev-release.apk \
$GITHUB_WORKSPACE/pos_system.apk
Expand Down
45 changes: 0 additions & 45 deletions .vscode/arb.code-snippets

This file was deleted.

256 changes: 126 additions & 130 deletions .vscode/arb.schema.json
Original file line number Diff line number Diff line change
@@ -1,150 +1,146 @@
{
"title": "ARB placeholder configuration files",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "ARB yaml configuration files",
"$schema": "https://json-schema.org/draft-07/schema",

"type": "object",
"patternProperties": {
"$prefix": { "type": "string" },
"^[\\w]+": {
"type": "string"
"type": ["string", "array", "object"],
"oneOf": [
{ "type": "string" },
{
"type": "array",
"items": {
"anyOf": [
{ "type": "string" },
{ "$ref": "#/$defs/placeholders" },
{ "type": "object", "description": "allo empty value" },
{
"description": "Select or plural key-value pair",
"type": "object",
"patternProperties": {
".*": {
"type": "string"
}
}
}
]
}
},
{ "$ref": "#" }
]
},
"^@[\\w]": {
"^@[\\w]": { "$ref": "#/$defs/meta" }
},
"$defs": {
"meta": {
"type": "object",
"properties": {
"description": { "type": "string" },
"placeholders": {
"placeholders": { "$ref": "#/$defs/placeholders" }
}
},
"placeholders": {
"type": "object",
"patternProperties": {
".*": {
"type": "object",
"patternProperties": {
".*": {
"properties": {
"type": {
"type": "string",
"enum": [
"String",
"string",
"integer",
"int",
"double",
"num",
"DateTime",
"Object"
]
},
"example": { "type": "string" },
"description": { "type": "string" },
"isCustomDateFormat": {
"anyOf": [
{ "type": "string", "enum": ["true", "false"] },
{ "type": "boolean" }
]
},
"optionalParameters": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"String",
"int",
"double",
"num",
"DateTime",
"Object"
]
},
"example": { "type": "string" },
"description": { "type": "string" },
"optionalParameters": {
"type": "object",
"properties": {
"decimalDigits": {
"type": "number",
"description": "Use for currency, compactCurrency and compactSimpleCurrecy"
},
"symbol": {
"type": "string",
"description": "Use for currency and compactCurrency"
},
"customPattern": {
"type": "string",
"description": "Use for currency details in https://pub.dev/documentation/intl/latest/intl/NumberFormat/NumberFormat.currency.html"
}
}
"decimalDigits": {
"type": "number",
"description": "Use for currency, compactCurrency and compactSimpleCurrecy"
},
"format": {
"symbol": {
"type": "string",
"enum": [
"compact",
"compactCurrency",
"compactLong",
"compactSimpleCurrency",
"currency",
"decimalPattern",
"decimalPercentPattern",
"percentPattern",
"scientificPattern",
"simpleCurrency",
"d",
"E",
"EEEE",
"LLL",
"LLLL",
"M",
"Md",
"MEd",
"MMM",
"MMMd",
"MMMEd",
"MMMM",
"MMMMd",
"MMMMEEEEd",
"QQQ",
"QQQQ",
"y",
"yM",
"yMd",
"yMEd",
"yMMM",
"yMMMd",
"yMMMEd",
"yMMMM",
"yMMMMd",
"yMMMMEEEEd",
"yQQQ",
"yQQQQ",
"H",
"Hm",
"Hms",
"j",
"jm",
"jms",
"m",
"ms",
"s"
],
"description": "See DateTime implement in https://pub.dev/documentation/intl/latest/intl/DateFormat-class.html\nNumber implement in https://pub.dev/documentation/intl/latest/intl/NumberFormat-class.html"
}
},
"defaultSnippets": [
{
"label": "String",
"description": "Add description inside @key placeholder",
"body": { "description": "$1", "type": "${2:String}" }
},
{
"label": "currency",
"description": "Currency format placeholder",
"body": {
"description": "$1",
"type": "num",
"format": "compactCurrency",
"optionalParameters": {
"decimalDigits": 0
}
}
},
{
"label": "int",
"description": "int placeholder",
"body": { "description": "$1", "type": "${2:int}" }
"description": "Use for currency and compactCurrency"
},
{
"label": "DateTime",
"description": "DateTime placeholder",
"body": {
"description": "$1",
"type": "DateTime",
"format": "${2:MMMEd}"
}
"customPattern": {
"type": "string",
"description": "Use for currency details in https://pub.dev/documentation/intl/latest/intl/NumberFormat/NumberFormat.currency.html"
}
]
}
},
"format": {
"type": "string",
"enum": [
"compact",
"compactCurrency",
"compactLong",
"compactSimpleCurrency",
"currency",
"decimalPattern",
"decimalPercentPattern",
"percentPattern",
"scientificPattern",
"simpleCurrency",
"d",
"E",
"EEEE",
"LLL",
"LLLL",
"M",
"Md",
"MEd",
"MMM",
"MMMd",
"MMMEd",
"MMMM",
"MMMMd",
"MMMMEEEEd",
"QQQ",
"QQQQ",
"y",
"yM",
"yMd",
"yMEd",
"yMMM",
"yMMMd",
"yMMMEd",
"yMMMM",
"yMMMMd",
"yMMMMEEEEd",
"yQQQ",
"yQQQQ",
"H",
"Hm",
"Hms",
"j",
"jm",
"jms",
"m",
"ms",
"s"
],
"description": "See DateTime implement in https://pub.dev/documentation/intl/latest/intl/DateFormat-class.html\nNumber implement in https://pub.dev/documentation/intl/latest/intl/NumberFormat-class.html"
}
}
}
},
"defaultSnippets": [
{
"label": "With description",
"description": "Add description inside @key",
"body": { "description": "$1" }
}
]
}
}
},
"type": "object"
}
}
12 changes: 2 additions & 10 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,7 @@
"files.associations": {
"*.arb": "json"
},
"json.schemas": [
{
"fileMatch": ["/lib/l10n/*.arb"],
"url": "/.vscode/arb.schema.json"
}
],
"json.format.enable": false,
"json.maxItemsComputed": 100,
"[json]": {
"editor.formatOnSave": false
"yaml.schemas": {
".vscode/arb.schema.json": ["/assets/l10n/**/*.yaml"]
}
}
14 changes: 13 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ test: ## Run tests
.PHONY: test-coverage
test-coverage: ## Run tests with coverage
flutter test --coverage
genhtml coverage/lcov.info -o coverage/html
@genhtml coverage/lcov.info -o coverage/html
@open coverage/html/index.html

##@ Build
.PHONY: bump
Expand Down Expand Up @@ -65,3 +66,14 @@ bump-beta: ## Bump beta version
.PHONY: mock
mock: ## Mock dependencies
flutter pub run build_runner build --delete-conflicting-outputs

.PHONY: build-l10n
build-l10n: ## Build localization
dart run arb_glue
flutter pub get --no-example

.PHONY: clean-version
clean-version: ## Clean beta and rc version
@git pull
@git tag -l | grep -E 'beta|rc' | xargs git push --delete origin
@git tag -l | grep -E 'beta|rc' | xargs git tag -d
Loading

0 comments on commit 03a1eea

Please sign in to comment.