import 'package:flutter/widgets.dart';
import 'app_localizations.dart';
/// Applies optional WordPress/API text overrides while retaining the generated
/// locale files as the safe offline and missing-key fallback.
class BackendAppLocalizations extends AppLocalizations {
BackendAppLocalizations({required this.base, required this.overrides})
: super(base.localeName);
final AppLocalizations base;
final Map<String, String> overrides;
AppLocalizations get _base => base;
String _name(Symbol symbol) =>
symbol.toString().replaceFirst('Symbol("', '').replaceFirst('")', '');
String _text(
String key,
String fallback, [
Map<String, Object?> args = const {},
]) {
final template = overrides[key];
if (template == null || template.isEmpty) return fallback;
var value = template;
for (final entry in args.entries) {
value = value.replaceAll('{${entry.key}}', '${entry.value}');
}
return value;
}
@override
dynamic noSuchMethod(Invocation invocation) {
final key = _name(invocation.memberName);
if (invocation.isGetter) {
final override = overrides[key];
if (override != null && override.isNotEmpty) return override;
final fallback = switch (key) {
'appTitle' => _base.appTitle,
'brandFallback' => _base.brandFallback,
'navStart' => _base.navStart,
'navPlaces' => _base.navPlaces,
'navMap' => _base.navMap,
'navEvents' => _base.navEvents,
'navCommunity' => _base.navCommunity,
'navSaved' => _base.navSaved,
'navMore' => _base.navMore,
'onboardingTitle' => _base.onboardingTitle,
'onboardingBody' => _base.onboardingBody,
'onboardingOfflineBody' => _base.onboardingOfflineBody,
'languageLabel' => _base.languageLabel,
'languageGerman' => _base.languageGerman,
'languageEnglish' => _base.languageEnglish,
'continueLabel' => _base.continueLabel,
'loadingLabel' => _base.loadingLabel,
'loadMore' => _base.loadMore,
'loadingMore' => _base.loadingMore,
'searchHint' => _base.searchHint,
'searchSubmit' => _base.searchSubmit,
'useLocation' => _base.useLocation,
'addressSearchTitle' => _base.addressSearchTitle,
'addressSearchHint' => _base.addressSearchHint,
'addressSearchSubmit' => _base.addressSearchSubmit,
'addressSearchNotConfigured' => _base.addressSearchNotConfigured,
'addressSearchNoResults' => _base.addressSearchNoResults,
'locationDenied' => _base.locationDenied,
'locationUnavailable' => _base.locationUnavailable,
'locationFallback' => _base.locationFallback,
'mapView' => _base.mapView,
'mapCurrentLocation' => _base.mapCurrentLocation,
'listView' => _base.listView,
'categoryFilterLabel' => _base.categoryFilterLabel,
'categoryFallback' => _base.categoryFallback,
'categoryApartment' => _base.categoryApartment,
'categoryHouse' => _base.categoryHouse,
'categoryLand' => _base.categoryLand,
'categoryCommercial' => _base.categoryCommercial,
'categoryOfficePractice' => _base.categoryOfficePractice,
'categoryOfficeAdmin' => _base.categoryOfficeAdmin,
'categoryRetailHospitality' => _base.categoryRetailHospitality,
'categoryRetailJobs' => _base.categoryRetailJobs,
'categoryCraftTrade' => _base.categoryCraftTrade,
'categoryEducation' => _base.categoryEducation,
'categoryHealthcare' => _base.categoryHealthcare,
'categoryPublicSocial' => _base.categoryPublicSocial,
'categoryCultureCreative' => _base.categoryCultureCreative,
'categoryItTech' => _base.categoryItTech,
'categoryTransportLogistics' => _base.categoryTransportLogistics,
'categoryWarehouse' => _base.categoryWarehouse,
'categoryApprenticeshipInternship' =>
_base.categoryApprenticeshipInternship,
'categoryWgRoom' => _base.categoryWgRoom,
'categoryTemporaryLiving' => _base.categoryTemporaryLiving,
'categoryBikesSports' => _base.categoryBikesSports,
'categoryBooksMedia' => _base.categoryBooksMedia,
'categoryClothing' => _base.categoryClothing,
'categoryElectronics' => _base.categoryElectronics,
'categoryFurnitureHome' => _base.categoryFurnitureHome,
'categoryGarageParking' => _base.categoryGarageParking,
'categoryTickets' => _base.categoryTickets,
'categoryServices' => _base.categoryServices,
'placeCategoryGastronomy' => _base.placeCategoryGastronomy,
'placeCategoryLeisure' => _base.placeCategoryLeisure,
'placeCategoryCulture' => _base.placeCategoryCulture,
'placeCategoryPlaygrounds' => _base.placeCategoryPlaygrounds,
'placeCategoryShopping' => _base.placeCategoryShopping,
'placeCategoryServices' => _base.placeCategoryServices,
'placeCategoryHealth' => _base.placeCategoryHealth,
'placeCategoryOther' => _base.placeCategoryOther,
'eventCategoryConcerts' => _base.eventCategoryConcerts,
'eventCategoryCulture' => _base.eventCategoryCulture,
'eventCategoryLeisure' => _base.eventCategoryLeisure,
'eventCategoryComedy' => _base.eventCategoryComedy,
'eventCategoryShows' => _base.eventCategoryShows,
'eventCategorySport' => _base.eventCategorySport,
'eventCategoryMarkets' => _base.eventCategoryMarkets,
'eventCategoryWorkshops' => _base.eventCategoryWorkshops,
'eventDateAll' => _base.eventDateAll,
'eventDateToday' => _base.eventDateToday,
'eventDateWeekend' => _base.eventDateWeekend,
'eventDateNext7Days' => _base.eventDateNext7Days,
'eventFilterApply' => _base.eventFilterApply,
'servicesFilterApply' => _base.servicesFilterApply,
'classifiedsFilterApply' => _base.classifiedsFilterApply,
'realEstateFilterApply' => _base.realEstateFilterApply,
'radiusLabelUnit' => _base.radiusLabelUnit,
'radiusMetersUnit' => _base.radiusMetersUnit,
'radiusKilometersUnit' => _base.radiusKilometersUnit,
'placesTitle' => _base.placesTitle,
'eventsTitle' => _base.eventsTitle,
'discoveryTitle' => _base.discoveryTitle,
'discoveryIntroBody' => _base.discoveryIntroBody,
'noResultsTitle' => _base.noResultsTitle,
'noResultsBody' => _base.noResultsBody,
'errorTitle' => _base.errorTitle,
'errorBody' => _base.errorBody,
'errorNetworkUnavailable' => _base.errorNetworkUnavailable,
'errorTimeout' => _base.errorTimeout,
'errorNotFound' => _base.errorNotFound,
'errorPermissionDenied' => _base.errorPermissionDenied,
'errorInvalidResponse' => _base.errorInvalidResponse,
'errorServiceUnavailable' => _base.errorServiceUnavailable,
'errorConflict' => _base.errorConflict,
'errorRateLimited' => _base.errorRateLimited,
'errorValidation' => _base.errorValidation,
'retry' => _base.retry,
'offlineTitle' => _base.offlineTitle,
'offlineBody' => _base.offlineBody,
'emptySavedTitle' => _base.emptySavedTitle,
'emptySavedBody' => _base.emptySavedBody,
'savedIntroBody' => _base.savedIntroBody,
'authRequiredTitle' => _base.authRequiredTitle,
'authRequiredBody' => _base.authRequiredBody,
'communityTitle' => _base.communityTitle,
'communityBody' => _base.communityBody,
'communitySafety' => _base.communitySafety,
'communityPlanned' => _base.communityPlanned,
'communityAvailabilityBody' => _base.communityAvailabilityBody,
'moreTitle' => _base.moreTitle,
'availableModulesTitle' => _base.availableModulesTitle,
'availableModulesBody' => _base.availableModulesBody,
'moduleServices' => _base.moduleServices,
'moduleClassifieds' => _base.moduleClassifieds,
'moduleJobs' => _base.moduleJobs,
'moduleRealEstate' => _base.moduleRealEstate,
'moduleNews' => _base.moduleNews,
'moduleGuides' => _base.moduleGuides,
'settingsTitle' => _base.settingsTitle,
'settingsAvailabilityBody' => _base.settingsAvailabilityBody,
'privacyTitle' => _base.privacyTitle,
'privacyAvailabilityBody' => _base.privacyAvailabilityBody,
'profileTitle' => _base.profileTitle,
'profileSignedIn' => _base.profileSignedIn,
'profileStatusLabel' => _base.profileStatusLabel,
'profileUnavailable' => _base.profileUnavailable,
'profileEdit' => _base.profileEdit,
'profileNickname' => _base.profileNickname,
'profileAge' => _base.profileAge,
'profileGender' => _base.profileGender,
'profileVisibility' => _base.profileVisibility,
'profileAvatarVisibility' => _base.profileAvatarVisibility,
'profilePublic' => _base.profilePublic,
'profilePrivate' => _base.profilePrivate,
'profileBio' => _base.profileBio,
'profileSave' => _base.profileSave,
'profileSaving' => _base.profileSaving,
'profileSaved' => _base.profileSaved,
'profileSaveError' => _base.profileSaveError,
'profileSystemDefault' => _base.profileSystemDefault,
'claimTitle' => _base.claimTitle,
'claimDescription' => _base.claimDescription,
'claimEmptyTitle' => _base.claimEmptyTitle,
'claimEmptyBody' => _base.claimEmptyBody,
'claimPending' => _base.claimPending,
'claimApproved' => _base.claimApproved,
'claimRejected' => _base.claimRejected,
'claimDecisionNote' => _base.claimDecisionNote,
'claimObject' => _base.claimObject,
'claimSubmittedOn' => _base.claimSubmittedOn,
'claimApplicantNote' => _base.claimApplicantNote,
'apiContractTitle' => _base.apiContractTitle,
'apiContractBody' => _base.apiContractBody,
'detailBack' => _base.detailBack,
'detailAddress' => _base.detailAddress,
'detailContact' => _base.detailContact,
'detailOpeningHours' => _base.detailOpeningHours,
'detailClosed' => _base.detailClosed,
'detailSpecialOffers' => _base.detailSpecialOffers,
'detailNeighbourhood' => _base.detailNeighbourhood,
'detailRating' => _base.detailRating,
'detailOffer' => _base.detailOffer,
'detailOfferType' => _base.detailOfferType,
'detailProvider' => _base.detailProvider,
'detailPriceType' => _base.detailPriceType,
'detailAvailability' => _base.detailAvailability,
'detailTransactionType' => _base.detailTransactionType,
'detailArea' => _base.detailArea,
'detailBathrooms' => _base.detailBathrooms,
'detailCondition' => _base.detailCondition,
'detailDelivery' => _base.detailDelivery,
'detailEmploymentType' => _base.detailEmploymentType,
'detailWorkMode' => _base.detailWorkMode,
'detailSalary' => _base.detailSalary,
'detailApplication' => _base.detailApplication,
'detailListingStatus' => _base.detailListingStatus,
'detailPrice' => _base.detailPrice,
'detailOrganisation' => _base.detailOrganisation,
'detailPropertyKind' => _base.detailPropertyKind,
'detailRooms' => _base.detailRooms,
'detailContactPreference' => _base.detailContactPreference,
'detailExpires' => _base.detailExpires,
'detailBrand' => _base.detailBrand,
'detailModel' => _base.detailModel,
'detailColor' => _base.detailColor,
'detailSize' => _base.detailSize,
'detailMaterial' => _base.detailMaterial,
'detailItemAge' => _base.detailItemAge,
'detailOriginalPrice' => _base.detailOriginalPrice,
'detailPaymentMode' => _base.detailPaymentMode,
'detailReferenceCode' => _base.detailReferenceCode,
'detailDepartment' => _base.detailDepartment,
'detailWorkHours' => _base.detailWorkHours,
'detailStartDate' => _base.detailStartDate,
'detailApplicationDeadline' => _base.detailApplicationDeadline,
'detailRequirements' => _base.detailRequirements,
'detailResponsibilities' => _base.detailResponsibilities,
'detailBenefits' => _base.detailBenefits,
'detailLanguages' => _base.detailLanguages,
'detailEducation' => _base.detailEducation,
'detailExperienceYears' => _base.detailExperienceYears,
'detailApplicationEmail' => _base.detailApplicationEmail,
'detailApplicationMethod' => _base.detailApplicationMethod,
'detailBedrooms' => _base.detailBedrooms,
'detailFloor' => _base.detailFloor,
'detailTotalFloors' => _base.detailTotalFloors,
'detailYearBuilt' => _base.detailYearBuilt,
'detailLastRenovated' => _base.detailLastRenovated,
'detailColdRent' => _base.detailColdRent,
'detailWarmRent' => _base.detailWarmRent,
'detailAdditionalCosts' => _base.detailAdditionalCosts,
'detailHeatingCostsIncluded' => _base.detailHeatingCostsIncluded,
'detailDeposit' => _base.detailDeposit,
'detailHouseFee' => _base.detailHouseFee,
'detailCommissionType' => _base.detailCommissionType,
'detailCommissionAmount' => _base.detailCommissionAmount,
'detailCommissionApplicable' => _base.detailCommissionApplicable,
'detailCommissionCalculation' => _base.detailCommissionCalculation,
'detailCommissionTotal' => _base.detailCommissionTotal,
'detailCommissionMonths' => _base.detailCommissionMonths,
'detailCommissionBuyerShare' => _base.detailCommissionBuyerShare,
'detailCommissionSellerShare' => _base.detailCommissionSellerShare,
'detailCommissionVat' => _base.detailCommissionVat,
'detailCommissionPayer' => _base.detailCommissionPayer,
'detailNoExperienceRequired' => _base.detailNoExperienceRequired,
'detailEnergyCertificate' => _base.detailEnergyCertificate,
'detailEnergyValue' => _base.detailEnergyValue,
'detailEnergyClass' => _base.detailEnergyClass,
'detailHeatingType' => _base.detailHeatingType,
'detailEnergySource' => _base.detailEnergySource,
'detailParkingSpaces' => _base.detailParkingSpaces,
'detailParkingPrice' => _base.detailParkingPrice,
'detailKitchen' => _base.detailKitchen,
'detailBalcony' => _base.detailBalcony,
'detailTerrace' => _base.detailTerrace,
'detailGarden' => _base.detailGarden,
'detailBasement' => _base.detailBasement,
'detailAttic' => _base.detailAttic,
'detailElevator' => _base.detailElevator,
'detailGuestToilet' => _base.detailGuestToilet,
'detailAirConditioning' => _base.detailAirConditioning,
'detailFloorHeating' => _base.detailFloorHeating,
'detailFireplace' => _base.detailFireplace,
'detailFurnished' => _base.detailFurnished,
'detailBarrierFree' => _base.detailBarrierFree,
'detailPetsAllowed' => _base.detailPetsAllowed,
'detailGarage' => _base.detailGarage,
'detailCarport' => _base.detailCarport,
'detailECharging' => _base.detailECharging,
'listingValueOffer' => _base.listingValueOffer,
'listingValueSearch' => _base.listingValueSearch,
'listingValueEmployment' => _base.listingValueEmployment,
'listingValueRent' => _base.listingValueRent,
'listingValueSale' => _base.listingValueSale,
'listingValuePrivate' => _base.listingValuePrivate,
'listingValueBusiness' => _base.listingValueBusiness,
'listingValueOrganization' => _base.listingValueOrganization,
'listingValueBroker' => _base.listingValueBroker,
'listingValueEmployer' => _base.listingValueEmployer,
'listingValueFixed' => _base.listingValueFixed,
'listingValueNegotiable' => _base.listingValueNegotiable,
'listingValueFree' => _base.listingValueFree,
'listingValueOnRequest' => _base.listingValueOnRequest,
'listingValueRange' => _base.listingValueRange,
'listingValueOnce' => _base.listingValueOnce,
'listingValueHour' => _base.listingValueHour,
'listingValueMonth' => _base.listingValueMonth,
'listingValueYear' => _base.listingValueYear,
'listingValueNew' => _base.listingValueNew,
'listingValueUsed' => _base.listingValueUsed,
'listingValueDefective' => _base.listingValueDefective,
'listingValueUnknown' => _base.listingValueUnknown,
'listingValuePickup' => _base.listingValuePickup,
'listingValueShipping' => _base.listingValueShipping,
'listingValueBothParties' => _base.listingValueBothParties,
'listingValueBoth' => _base.listingValueBoth,
'listingValueDigital' => _base.listingValueDigital,
'listingValueNone' => _base.listingValueNone,
'listingValueFullTime' => _base.listingValueFullTime,
'listingValuePartTime' => _base.listingValuePartTime,
'listingValueFreelance' => _base.listingValueFreelance,
'listingValueApprenticeship' => _base.listingValueApprenticeship,
'listingValueInternship' => _base.listingValueInternship,
'listingValueOnsite' => _base.listingValueOnsite,
'listingValueHybrid' => _base.listingValueHybrid,
'listingValueRemote' => _base.listingValueRemote,
'listingValueCash' => _base.listingValueCash,
'listingValueBankTransfer' => _base.listingValueBankTransfer,
'listingValueSecurePayment' => _base.listingValueSecurePayment,
'listingValueOther' => _base.listingValueOther,
'listingValueBuyer' => _base.listingValueBuyer,
'listingValueCommissionFree' => _base.listingValueCommissionFree,
'listingValueCommissionPaid' => _base.listingValueCommissionPaid,
'listingValueExcluded' => _base.listingValueExcluded,
'listingValueIncluded' => _base.listingValueIncluded,
'listingValueLandlord' => _base.listingValueLandlord,
'listingValueMinijob' => _base.listingValueMinijob,
'listingValueMonthlyRent' => _base.listingValueMonthlyRent,
'listingValuePercentage' => _base.listingValuePercentage,
'listingValueSeasonal' => _base.listingValueSeasonal,
'listingValueSeller' => _base.listingValueSeller,
'listingValueTemporary' => _base.listingValueTemporary,
'listingValueTenant' => _base.listingValueTenant,
'listingValueTrainee' => _base.listingValueTrainee,
'listingValueVolunteer' => _base.listingValueVolunteer,
'listingValueWorkingStudent' => _base.listingValueWorkingStudent,
'listingValueFirstOccupancy' => _base.listingValueFirstOccupancy,
'listingValueRenovated' => _base.listingValueRenovated,
'listingValueWellKept' => _base.listingValueWellKept,
'listingValueNeedsRenovation' => _base.listingValueNeedsRenovation,
'listingValueDemand' => _base.listingValueDemand,
'listingValueConsumption' => _base.listingValueConsumption,
'listingValueYes' => _base.listingValueYes,
'listingValueNo' => _base.listingValueNo,
'listingValueMoreThanSix' => _base.listingValueMoreThanSix,
'listingValueCustom' => _base.listingValueCustom,
'jobsHeroTitle' => _base.jobsHeroTitle,
'jobsHeroBody' => _base.jobsHeroBody,
'jobsSearchHint' => _base.jobsSearchHint,
'jobsTopJob' => _base.jobsTopJob,
'jobsNew' => _base.jobsNew,
'jobsApplyNow' => _base.jobsApplyNow,
'jobsAbout' => _base.jobsAbout,
'jobsTasks' => _base.jobsTasks,
'jobsRequirements' => _base.jobsRequirements,
'jobsDetailsTitle' => _base.jobsDetailsTitle,
'jobsScreenTitle' => _base.jobsScreenTitle,
'jobsSalaryHour' => _base.jobsSalaryHour,
'jobsSalaryMonth' => _base.jobsSalaryMonth,
'jobsSalaryYear' => _base.jobsSalaryYear,
'jobsSalaryOnce' => _base.jobsSalaryOnce,
'jobsFilterApply' => _base.jobsFilterApply,
'jobsFilterReset' => _base.jobsFilterReset,
'jobsLocation' => _base.jobsLocation,
'jobsWorkModel' => _base.jobsWorkModel,
'jobsEmploymentType' => _base.jobsEmploymentType,
'jobsSalaryGross' => _base.jobsSalaryGross,
'jobsSalaryInterval' => _base.jobsSalaryInterval,
'jobsSalaryMonthly' => _base.jobsSalaryMonthly,
'jobsSalaryYearly' => _base.jobsSalaryYearly,
'jobsSalaryConversionHint' => _base.jobsSalaryConversionHint,
'jobsIndustry' => _base.jobsIndustry,
'jobsCompany' => _base.jobsCompany,
'jobsMoreFilters' => _base.jobsMoreFilters,
'jobsAllIndustries' => _base.jobsAllIndustries,
'jobsAllCompanies' => _base.jobsAllCompanies,
'jobsTopOnly' => _base.jobsTopOnly,
'jobsRecentOnly' => _base.jobsRecentOnly,
'jobsNewestFirst' => _base.jobsNewestFirst,
'callAction' => _base.callAction,
'websiteAction' => _base.websiteAction,
'shareAction' => _base.shareAction,
'linkOpenFailed' => _base.linkOpenFailed,
'detailFeatured' => _base.detailFeatured,
'detailDescription' => _base.detailDescription,
'save' => _base.save,
'saved' => _base.saved,
'routeAction' => _base.routeAction,
'eventDate' => _base.eventDate,
'detailEvent' => _base.detailEvent,
'eventTicketMode' => _base.eventTicketMode,
'eventTicketUrl' => _base.eventTicketUrl,
'eventTicketPrice' => _base.eventTicketPrice,
'eventOrganizer' => _base.eventOrganizer,
'eventOrganizerUrl' => _base.eventOrganizerUrl,
'eventVenue' => _base.eventVenue,
'eventOccurrences' => _base.eventOccurrences,
'eventTimezone' => _base.eventTimezone,
'eventCalendarSave' => _base.eventCalendarSave,
'eventTicketFree' => _base.eventTicketFree,
'eventTicketExternal' => _base.eventTicketExternal,
'eventTicketInternal' => _base.eventTicketInternal,
'eventTicketRegistration' => _base.eventTicketRegistration,
'contentUnavailable' => _base.contentUnavailable,
'contentTypePlace' => _base.contentTypePlace,
'contentTypeEvent' => _base.contentTypeEvent,
'contentTypeService' => _base.contentTypeService,
'contentTypeClassified' => _base.contentTypeClassified,
'contentTypeJob' => _base.contentTypeJob,
'contentTypeRealEstate' => _base.contentTypeRealEstate,
'contentTypeOther' => _base.contentTypeOther,
'unknownValue' => _base.unknownValue,
'locationPermissionTitle' => _base.locationPermissionTitle,
'locationPermissionBody' => _base.locationPermissionBody,
'locationActive' => _base.locationActive,
'locationStartupTitle' => _base.locationStartupTitle,
'locationStartupBody' => _base.locationStartupBody,
'allowLocation' => _base.allowLocation,
'later' => _base.later,
'permissionDenied' => _base.permissionDenied,
'permissionDeniedBody' => _base.permissionDeniedBody,
'refresh' => _base.refresh,
'openDetails' => _base.openDetails,
'back' => _base.back,
'close' => _base.close,
'selectLanguage' => _base.selectLanguage,
'mapProviderPending' => _base.mapProviderPending,
'mapProviderConfigured' => _base.mapProviderConfigured,
'mapSourceUnavailable' => _base.mapSourceUnavailable,
'mapGoogleFallback' => _base.mapGoogleFallback,
'openGoogleMaps' => _base.openGoogleMaps,
'mapTileLoadFailed' => _base.mapTileLoadFailed,
'mapSearchCenter' => _base.mapSearchCenter,
'mapZoomIn' => _base.mapZoomIn,
'mapZoomOut' => _base.mapZoomOut,
'mapStyleRoad' => _base.mapStyleRoad,
'mapStyleLight' => _base.mapStyleLight,
'mapStyleDark' => _base.mapStyleDark,
'mapStyleSatellite' => _base.mapStyleSatellite,
'menuLabel' => _base.menuLabel,
'searchSemantics' => _base.searchSemantics,
'filterAll' => _base.filterAll,
'filterMinimum' => _base.filterMinimum,
'filterMaximum' => _base.filterMaximum,
'filterLabel' => _base.filterLabel,
'clearLabel' => _base.clearLabel,
'sortAuto' => _base.sortAuto,
'sortDistance' => _base.sortDistance,
'sortNewest' => _base.sortNewest,
'sortTitle' => _base.sortTitle,
'eventEnd' => _base.eventEnd,
'placesFilterApply' => _base.placesFilterApply,
'eventStatus' => _base.eventStatus,
'eventScheduled' => _base.eventScheduled,
'eventCancelled' => _base.eventCancelled,
'eventPostponed' => _base.eventPostponed,
'eventStatusUnknown' => _base.eventStatusUnknown,
'mapNoPublicLocations' => _base.mapNoPublicLocations,
'imageSuggestCta' => _base.imageSuggestCta,
'imageSuggestTitle' => _base.imageSuggestTitle,
'imageSuggestUploadTitle' => _base.imageSuggestUploadTitle,
'imageSuggestSelect' => _base.imageSuggestSelect,
'imageSuggestSelectAnother' => _base.imageSuggestSelectAnother,
'imageSuggestNoFile' => _base.imageSuggestNoFile,
'imageSuggestPreviewFailed' => _base.imageSuggestPreviewFailed,
'imageSuggestFileUnavailable' => _base.imageSuggestFileUnavailable,
'imageSuggestLoginTitle' => _base.imageSuggestLoginTitle,
'imageSuggestLoginBody' => _base.imageSuggestLoginBody,
'imageSuggestRightsTitle' => _base.imageSuggestRightsTitle,
'imageSuggestRightsHolder' => _base.imageSuggestRightsHolder,
'imageSuggestLawfulSource' => _base.imageSuggestLawfulSource,
'imageSuggestPersons' => _base.imageSuggestPersons,
'imageSuggestPlatformLicense' => _base.imageSuggestPlatformLicense,
'imageSuggestMetadataTitle' => _base.imageSuggestMetadataTitle,
'imageSuggestOptional' => _base.imageSuggestOptional,
'imageSuggestSource' => _base.imageSuggestSource,
'imageSuggestLicense' => _base.imageSuggestLicense,
'imageSuggestPhotographer' => _base.imageSuggestPhotographer,
'imageSuggestDescription' => _base.imageSuggestDescription,
'imageSuggestSubmit' => _base.imageSuggestSubmit,
'imageSuggestSubmitting' => _base.imageSuggestSubmitting,
'imageSuggestStatusTitle' => _base.imageSuggestStatusTitle,
'imageSuggestStatusSubmitted' => _base.imageSuggestStatusSubmitted,
'imageSuggestStatusInReview' => _base.imageSuggestStatusInReview,
'imageSuggestStatusAccepted' => _base.imageSuggestStatusAccepted,
'imageSuggestStatusRejected' => _base.imageSuggestStatusRejected,
'imageSuggestStatusNeedsInfo' => _base.imageSuggestStatusNeedsInfo,
'imageSuggestStatusPending' => _base.imageSuggestStatusPending,
'imageSuggestTargetOther' => _base.imageSuggestTargetOther,
'imageSuggestUnavailableTitle' => _base.imageSuggestUnavailableTitle,
'imageSuggestUnavailableBody' => _base.imageSuggestUnavailableBody,
'imageSuggestReason' => _base.imageSuggestReason,
'imageSuggestReasonCopyright' => _base.imageSuggestReasonCopyright,
'imageSuggestReasonPrivacy' => _base.imageSuggestReasonPrivacy,
'imageSuggestReasonQuality' => _base.imageSuggestReasonQuality,
'imageSuggestReasonDuplicate' => _base.imageSuggestReasonDuplicate,
'imageSuggestReasonMalware' => _base.imageSuggestReasonMalware,
'imageSuggestReasonUnclearRights' =>
_base.imageSuggestReasonUnclearRights,
'imageSuggestReasonWrongTarget' => _base.imageSuggestReasonWrongTarget,
'imageSuggestReasonOther' => _base.imageSuggestReasonOther,
'imageSuggestReasonUnknown' => _base.imageSuggestReasonUnknown,
'imageSuggestMyTitle' => _base.imageSuggestMyTitle,
'imageSuggestMyBody' => _base.imageSuggestMyBody,
'imageSuggestMyEmpty' => _base.imageSuggestMyEmpty,
'imageSuggestMyRetry' => _base.imageSuggestMyRetry,
'imageSuggestViewAll' => _base.imageSuggestViewAll,
'imageSuggestResponseTitle' => _base.imageSuggestResponseTitle,
'imageSuggestResponseBody' => _base.imageSuggestResponseBody,
'imageSuggestResponseLabel' => _base.imageSuggestResponseLabel,
'imageSuggestResponseRequired' => _base.imageSuggestResponseRequired,
'imageSuggestResponseSubmit' => _base.imageSuggestResponseSubmit,
'imageSuggestResponseSubmitting' =>
_base.imageSuggestResponseSubmitting,
'imageSuggestResponseSent' => _base.imageSuggestResponseSent,
'imageSuggestResponseOpen' => _base.imageSuggestResponseOpen,
'notificationsTitle' => _base.notificationsTitle,
'notificationsEmptyTitle' => _base.notificationsEmptyTitle,
'notificationsEmptyBody' => _base.notificationsEmptyBody,
'notificationsFilterAll' => _base.notificationsFilterAll,
'notificationsFilterUnread' => _base.notificationsFilterUnread,
'notificationGenericBody' => _base.notificationGenericBody,
'notificationImageSuggestionTitle' =>
_base.notificationImageSuggestionTitle,
'favoriteRemove' => _base.favoriteRemove,
'favoriteSaving' => _base.favoriteSaving,
'favoriteSavedBody' => _base.favoriteSavedBody,
'favoriteRemovedBody' => _base.favoriteRemovedBody,
'favoriteError' => _base.favoriteError,
'homeQuickAccessTitle' => _base.homeQuickAccessTitle,
'homeEventsTitle' => _base.homeEventsTitle,
'homeNewsTitle' => _base.homeNewsTitle,
'homeNearbyTitle' => _base.homeNearbyTitle,
'homeNearbyAction' => _base.homeNearbyAction,
'homeNearbyBody' => _base.homeNearbyBody,
'homeListingsTitle' => _base.homeListingsTitle,
'homeEmptyBody' => _base.homeEmptyBody,
'homeCommunityTitle' => _base.homeCommunityTitle,
'homeCommunityBody' => _base.homeCommunityBody,
'homeCommunityAction' => _base.homeCommunityAction,
_ => null,
};
if (fallback != null) return fallback;
}
if (invocation.isMethod) {
final args = invocation.positionalArguments;
switch (key) {
case 'addressSearchSelected':
return _text(key, base.addressSearchSelected(args[0] as String), {
'label': args[0],
});
case 'radiusLabel':
return _text(key, base.radiusLabel(args[0]), {'radius': args[0]});
case 'resultsCount':
return _text(key, base.resultsCount(args[0] as int), {
'count': args[0],
});
case 'resultsCountSingular':
return _text(key, base.resultsCountSingular(args[0] as int), {
'count': args[0],
});
case 'resultsSummary':
return _text(key, base.resultsSummary(args[0] as int), {
'count': args[0],
});
case 'claimSummary':
return _text(key, base.claimSummary(args[0] as int), {
'count': args[0],
});
case 'distanceKm':
return _text(key, base.distanceKm(args[0] as String), {
'distance': args[0],
});
case 'systemErrorCode':
return _text(key, base.systemErrorCode(args[0] as String), {
'code': args[0],
});
case 'selectedLanguage':
return _text(key, base.selectedLanguage(args[0] as String), {
'language': args[0],
});
case 'markerLabel':
return _text(key, base.markerLabel(args[0] as String), {
'title': args[0],
});
case 'mapClusterLabel':
return _text(key, base.mapClusterLabel(args[0] as int), {
'count': args[0],
});
case 'imageSuggestBody':
return _text(key, base.imageSuggestBody(args[0] as String), {
'title': args[0],
});
case 'imageSuggestTarget':
return _text(key, base.imageSuggestTarget(args[0] as String), {
'resource': args[0],
});
case 'imageSuggestMyItemStatus':
return _text(key, base.imageSuggestMyItemStatus(args[0] as String), {
'status': args[0],
});
case 'imageSuggestSubmittedAt':
return _text(key, base.imageSuggestSubmittedAt(args[0] as String), {
'date': args[0],
});
case 'notificationImageSuggestionBody':
return _text(
key,
base.notificationImageSuggestionBody(args[0] as String),
{'status': args[0]},
);
case 'notificationsUnreadCount':
return _text(key, base.notificationsUnreadCount(args[0] as num), {
'count': args[0],
});
case 'jobsLocationSummary':
return _text(key, base.jobsLocationSummary(args[0] as String), {
'radius': args[0],
});
case 'jobsFound':
return _text(key, base.jobsFound(args[0] as int), {'count': args[0]});
}
}
return super.noSuchMethod(invocation);
}
}
class BackendLocalizationsDelegate
extends LocalizationsDelegate<AppLocalizations> {
const BackendLocalizationsDelegate(this.allOverrides);
final Map<String, Map<String, String>> allOverrides;
@override
bool isSupported(Locale locale) =>
AppLocalizations.delegate.isSupported(locale);
@override
Future<AppLocalizations> load(Locale locale) async {
final base = await AppLocalizations.delegate.load(locale);
final tag = locale.toLanguageTag().replaceFirst('-', '_');
final language = locale.languageCode;
final overrides = allOverrides[tag] ?? allOverrides[language] ?? const {};
return BackendAppLocalizations(base: base, overrides: overrides);
}
@override
bool shouldReload(covariant BackendLocalizationsDelegate old) =>
old.allOverrides != allOverrides;
}
