Skip to content

Commit

Permalink
Merge branch 'larryaasen:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
amarell authored Jun 9, 2024
2 parents 5e7a36c + fff0a2d commit 1d88113
Show file tree
Hide file tree
Showing 9 changed files with 71 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
files: lcov.info

- name: Boot the simulator
run: xcrun simctl boot 'iPhone 13'
run: xcrun simctl boot 'iPhone 15'

- name: Run the driver test
run: cd example; flutter drive --target=test/driver_test/driver.dart --driver=test/driver_test/driver_test.dart
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
## Next

- [413] Fixed Haitian Creole messages to use correct grammar. (thanks to @wjeanvilma)
- [415] Added Kurdish Sorani ('ku') language translation. (thanks to @drpshtiwan)

## 10.3.0

Allowed for package_info_plus 8.0.0.

## 10.2.0

Allowed for package_info_plus 7.0.0.
Expand Down
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ UpgradeAlert(Upgrader(messages: MyUpgraderMessages()));

## Language localization

The strings displayed in `upgrader` are already localized in 34 languages. New languages will be
The strings displayed in `upgrader` are already localized in 35 languages. New languages will be
supported in the future with minor updates. It also supports right to left languages.

Languages supported:
Expand All @@ -395,6 +395,7 @@ Languages supported:
* Kazakh ('kk')
* Khmer ('km')
* Korean ('ko')
* Kurdish Sorani ('ku')
* Lithuanian ('lt')
* Mongolian ('mn')
* Norwegian ('nb')
Expand All @@ -410,6 +411,7 @@ Languages supported:
* Ukrainian ('uk')
* Vietnamese ('vi')


The `upgrader` package can be supplied with additional languages in your code by extending the `UpgraderMessages` class
to provide custom values.

Expand Down Expand Up @@ -481,6 +483,25 @@ help you customize the `upgrader` experience for your app. Check these out.
| main_min_app_version.dart | main_multiple.dart | main_stateful.dart |
| main_subclass.dart | | |

## Tapping UPDATE NOW button issue on Android

Seeing an error similar to this on Android after tapping the UPDATE NOW button?
```
I/UrlLauncher(11833): component name for https://www.google.com/ is null
```

Adding this to the AndroidManifest.xml file will solve this issue. Add this at the bottom of the file just above the closing `</manifest>` tag.
```
<queries>
<intent>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" />
</intent>
</queries>
```

This was taken from this Android documentation: https://developer.android.com/training/package-visibility/use-cases#check-browser-available

## iTunes Search API

Expand Down
7 changes: 7 additions & 0 deletions example/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,11 @@
android:name="flutterEmbedding"
android:value="2" />
</application>
<queries>
<intent>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" />
</intent>
</queries>
</manifest>
2 changes: 2 additions & 0 deletions example/lib/main_messages.dart
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ class MyApp extends StatelessWidget {
Locale('kk', ''), // Kazakh, no country code
Locale('km', ''), // Khmer, no country code
Locale('ko', ''), // Korean, no country code
Locale('ku', ''), // Kurdish Sorani, no country code
Locale('lt', ''), // Lithuanian, no country code
Locale('mn', ''), // Mongolian, no country code
Locale('nb', ''), // Norwegian, no country code
Expand Down Expand Up @@ -149,6 +150,7 @@ class DemoLocalizationsDelegate
'kk',
'km',
'ko',
'ku',
'lt',
'mn',
'nb',
Expand Down
2 changes: 1 addition & 1 deletion lib/src/itunes_search_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class ITunesSearchAPI {
}
final url = lookupURLByBundleId(bundleId,
country: country ??= '', useCacheBuster: useCacheBuster)!;
country: country ?? '', useCacheBuster: useCacheBuster)!;
if (debugLogging) {
print('upgrader: download: $url');
}
Expand Down
31 changes: 26 additions & 5 deletions lib/src/upgrade_messages.dart
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ class UpgraderMessages {
break;
case 'ht':
message =
'Yon nouvo vèsyon {{appName}} disponib! Vèsyon {{currentAppStoreVersion}} disponib, epi ou gen vèsyon {{currentInstalledVersion}}.';
'Yon nouvo vèsyon {{appName}} disponib! Vèsyon {{currentAppStoreVersion}} disponib, ou gen vèsyon {{currentInstalledVersion}}.';
break;
case 'hu':
message =
Expand Down Expand Up @@ -185,6 +185,10 @@ class UpgraderMessages {
message =
'{{appName}}이 새 버전으로 업데이트되었습니다! 최신 버전 {{currentAppStoreVersion}}으로 업그레이드 가능합니다 - 현재 버전 {{currentInstalledVersion}}.';
break;
case 'ku':
message =
'وەشانی نوێی {{appName}} بەردەستە! وەشانی {{currentAppStoreVersion}} بەردەستە- تۆ وەشانی {{currentInstalledVersion}} دابەزاندوە.';
break;
case 'lt':
message =
'Išleista nauja programos {{appName}} versija! Versija {{currentAppStoreVersion}} yra prieinama, jūs turite {{currentInstalledVersion}}.';
Expand Down Expand Up @@ -290,7 +294,7 @@ class UpgraderMessages {
message = 'नज़रअंदाज़ करना';
break;
case 'ht':
message = 'IGNORE';
message = 'INYORE';
break;
case 'hu':
message = 'KIHAGYOM';
Expand All @@ -313,6 +317,9 @@ class UpgraderMessages {
case 'ko':
message = '무시';
break;
case 'ku':
message = 'پشتگوێخستن';
break;
case 'lt':
message = 'IGNORUOTI';
break;
Expand Down Expand Up @@ -429,6 +436,9 @@ class UpgraderMessages {
case 'ko':
message = '나중에';
break;
case 'ku':
message = 'دواتر';
break;
case 'lt':
message = 'ATNAUJINTI VĖLIAU';
break;
Expand Down Expand Up @@ -470,7 +480,6 @@ class UpgraderMessages {
break;
case 'zh':
message = '以后';
break;
case 'en':
default:
message = 'LATER';
Expand Down Expand Up @@ -542,6 +551,9 @@ class UpgraderMessages {
case 'ko':
message = '지금 업데이트';
break;
case 'ku':
message = 'نوێکردنەوە';
break;
case 'lt':
message = 'ATNAUJINTI DABAR';
break;
Expand Down Expand Up @@ -632,7 +644,7 @@ class UpgraderMessages {
message = 'क्या आप इसे अभी अद्यतन करना चाहेंगे?';
break;
case 'ht':
message = 'Èske ou vle mete ajou aplikasyon an kounye a?';
message = 'Èske ou vle mete aplikasyon an ajou kounye a?';
break;
case 'hu':
message = 'Akarja most frissíteni?';
Expand All @@ -655,6 +667,9 @@ class UpgraderMessages {
case 'ko':
message = '지금 업데이트를 시작하시겠습니까?';
break;
case 'ku':
message = 'دەتەوێت ئێستا نوێی بکەیەوە؟';
break;
case 'lt':
message = 'Ar norite atnaujinti dabar?';
break;
Expand Down Expand Up @@ -741,6 +756,9 @@ class UpgraderMessages {
case 'ja':
message = 'リリースノート';
break;
case 'ku':
message = 'تیبینەکانی وەشان';
break;
case 'pt':
message = 'Novidades';
break;
Expand Down Expand Up @@ -821,7 +839,7 @@ class UpgraderMessages {
message = 'अद्यतन ऐप?';
break;
case 'ht':
message = 'Mete ajou app a?';
message = 'Mete app la ajou?';
break;
case 'hu':
message = 'FrissÍtés?';
Expand All @@ -844,6 +862,9 @@ class UpgraderMessages {
case 'ko':
message = '앱을 업데이트하시겠습니까?';
break;
case 'ku':
message = 'نوێکردنەوەی ئەپ؟';
break;
case 'lt':
message = 'Atnaujinti programą?';
break;
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: upgrader
description: Flutter package for prompting users to upgrade when there is a newer version of the app in the store.
version: 10.2.0
version: 10.3.0
homepage: https://github.com/larryaasen/upgrader

environment:
Expand All @@ -24,7 +24,7 @@ dependencies:
os_detect: ^2.0.1

# From Flutter Community: Provides an API for querying information about an application package.
package_info_plus: '>=4.0.1 <8.0.0'
package_info_plus: '>=4.0.1 <9.0.0'

# From Flutter Team: Wraps NSUserDefaults (on iOS) and SharedPreferences (on Android).
shared_preferences: '>=2.1.1 <3.0.0'
Expand Down
1 change: 1 addition & 0 deletions test/upgrader_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1151,6 +1151,7 @@ void main() {
verifyMessages(UpgraderMessages(code: 'kk'), 'kk');
verifyMessages(UpgraderMessages(code: 'km'), 'km');
verifyMessages(UpgraderMessages(code: 'ko'), 'ko');
verifyMessages(UpgraderMessages(code: 'ku'), 'ku');
verifyMessages(UpgraderMessages(code: 'lt'), 'lt');
verifyMessages(UpgraderMessages(code: 'mn'), 'mn');
verifyMessages(UpgraderMessages(code: 'nb'), 'nb');
Expand Down

0 comments on commit 1d88113

Please sign in to comment.