mohesu / map_location_picker

Map location picker for flutter Based on google_maps_flutter
Apache License 2.0
46 stars 68 forks source link

More languages support / handle no language support #4

Closed Lampat closed 2 years ago

Lampat commented 2 years ago

My app uses 2 languages, english and greek, when the phone is on greek the package doesn't work correctly, apparently greek language is not supported by the package and the top bar is a red box..

Either it should have more languages to support or have a fallback that if it doesn't find the device's language to get a default (eg english Screenshot_1 )

Lampat commented 2 years ago

Since I forgot this is what it shows in the debug console ════════ Exception caught by widgets library ═══════════════════════════════════ No instance of S present in the widget tree. Did you add S.delegate in localizationsDelegates? 'package:map_location_picker/generated/l10n.dart': package:map_location_picker/generated/l10n.dart:1 Failed assertion: line 44 pos 12: 'instance != null'

And in my main class locale: localeManager.locale, supportedLocales: AppService().locales(), localizationsDelegates: const [ S.delegate, AppLocalizations.delegate, GlobalMaterialLocalizations.delegate, GlobalWidgetsLocalizations.delegate, GlobalCupertinoLocalizations.delegate, ],

rvndsngwn commented 2 years ago

Hi @Lampat, I would love it if you translate intl_es.arb into the Greek language.

Also, I fix this error.

{
  "@@locale": "en",
  "please_check_your_connection": "Please check your connection",
  "server_error": "Server error",
  "access_to_location_denied": "Access to location denied",
  "allow_access_to_the_location_services": "Allow access to the location services.",
  "access_to_location_permanently_denied": "Access to location permanently denied",
  "allow_access_to_the_location_services_from_settings": "Allow access to the location services for this App using the device settings.",
  "ok": "Ok",
  "cant_get_current_location": "Can't get current location",
  "please_make_sure_you_enable_gps_and_try_again": "Please make sure you enable GPS and try again",
  "search_place": "Search place",
  "finding_place": "Finding place...",
  "no_result_found": "No result found",
  "unnamedPlace": "Unnamed place"
}
Lampat commented 2 years ago

Hi again @rvndsngwn , is this what you meant?? { "@@locale": "el", "please_check_your_connection": "Παρακαλώ ελέγξτε τη συνδεσή σας", "server_error": "Σφάλμα διακομιστή", "access_to_location_denied": "Δεν επιτρέπεται η πρόβαση στην τοποθεσία", "allow_access_to_the_location_services": "Επιτρέψτε την πρόσβαση στις υπηρεσίες της τοποθεσίας.", "access_to_location_permanently_denied": "Απαγορεύεται οριστικά η πρόσβαση στην τοποθεσία της συσκευής", "allow_access_to_the_location_services_from_settings": "Επιτρέψτε την πρόσβαση στις υπηρεσίες τοποθεσίας για αυτήν την εφαρμογή χρησιμοποιώντας τις ρυθμίσεις της συσκευής.", "ok": "Οκ", "cant_get_current_location": "Δεν είναι δυνατή η λήψη της τρέχουσας τοποθεσίας", "please_make_sure_you_enable_gps_and_try_again": "Βεβαιωθείτε ότι έχετε ενεργοποιήσει το GPS και δοκιμάστε ξανά", "search_place": "Αναζήτηση τοποθεσίας", "finding_place": "Εύρεση τοποθεσίας...", "no_result_found": "Δεν βρέθηκε αποτέλεσμα", "unnamedPlace": "Τοποθεσία χωρίς όνομα" }

rvndsngwn commented 2 years ago