diff --git a/Client/Modules/Home/Index.razor b/Client/Modules/Home/Index.razor index dc0c8d6..b178c07 100644 --- a/Client/Modules/Home/Index.razor +++ b/Client/Modules/Home/Index.razor @@ -5,7 +5,7 @@ @inject IStringLocalizer Localizer
-

Welcome to TenTrees Database

+

@Localizer["Heading.Welcome"]


@@ -47,6 +47,20 @@ else public string Icon { get; set; } } + // tile names keyed by Oqtane page name so display labels can be localized without changing page metadata + private static readonly Dictionary _tileNameKeys = new(StringComparer.OrdinalIgnoreCase) + { + ["Enrollment"] = "TileName.Enrollment", + ["Classes"] = "TileName.Classes", + ["Training"] = "TileName.Training", + ["Grower"] = "TileName.Grower", + ["Assessment"] = "TileName.Assessment", + ["Village"] = "TileName.Village", + ["Cohort"] = "TileName.Cohort", + ["Mentor"] = "TileName.Mentor", + ["TreeType"] = "TileName.TreeType", + }; + // brief descriptions keyed by page name and looked up via resx so they can be localized - Page has no description field of its own private static readonly Dictionary _descriptionKeys = new(StringComparer.OrdinalIgnoreCase) { @@ -98,6 +112,17 @@ else .ToList(); } + private string GetTileName(string pageName) + { + if (!_tileNameKeys.TryGetValue(pageName, out var resourceKey)) + { + return pageName; + } + + var localizedName = Localizer[resourceKey]; + return localizedName.ResourceNotFound ? pageName : localizedName.Value; + } + private RenderFragment RenderTiles(List tiles) => @
@foreach (var tile in tiles) { @@ -109,7 +134,7 @@ else { } - @tile.Name + @GetTileName(tile.Name) @if (!string.IsNullOrEmpty(tile.Description)) { diff --git a/Client/Resources/OpenEug.TenTrees.Module.Assessment/Edit.ts-ZA.resx b/Client/Resources/OpenEug.TenTrees.Module.Assessment/Edit.ts-ZA.resx index e801f47..cf36374 100644 --- a/Client/Resources/OpenEug.TenTrees.Module.Assessment/Edit.ts-ZA.resx +++ b/Client/Resources/OpenEug.TenTrees.Module.Assessment/Edit.ts-ZA.resx @@ -46,7 +46,7 @@ Mirhi leyi ha Hanyaka - [XS] If any died, which ones? + Loko yin’wani Yi file hi yini? -- Hlawula Muxaka wa Murhi -- @@ -61,64 +61,64 @@ Swiphiqo - [XS] Which problems do you observe? + Hi swihi swiphiqo leswi u swi vona ka? A ku si na mirhi leyi tsariweke eka mulimi loyi ha yona. - [XS] The trees have yellow leaves + Mirhi yina matluka ya xitshopana. - [XS] The trees have broken branches + Mirhi yina marhavi lama tshovekeke. - [XS] The trees are losing their leaves + Mirhi yi hlanhlekela matluka. - [XS] The trees look dry + Mirhi yi vona ka yi omile. - [XS] Pests eating the plant + Swi tsotswana swidya murhi. - [XS] Do you need someone to help with this problem? + Xana ulava munhu wo ku pfuna eka xiphiqo lexi? Mikhuva ya Permaculture - [XS] Do the trees look healthy? + Xana mirhi yi vonaka yi hanye kahle? - [XS] Any chemical fertilizers? + Xana kuni manyoro ya tikhemikhali? - [XS] Any pesticides used? + Xana kuni swi sivela switsotswana? - [XS] Are the trees mulched? + Xana mirhi leyi yi funengetiwile hansi? - [XS] Are they making compost? + Xana VA endla manyoro ya swilo swa ntumbuluko? - [XS] Are they collecting water? + Xana VA hlengeleta mati? - [XS] Any leaky taps visible? + Xana Kuna lani ku pfutaka mati? - [XS] Is the garden designed to capture water? + Xana nsimu yi endliwile hi ndlela yo hlengeleta mati? - [XS] Are they using greywater? + Xana va tirhisa mati lama tirhisiweke? Tinotsi - [XS] No notes yet. Add the first observation below. + A kuna tinotsi to engetela. Ndzavisiso la hansi. Ntolovelo @@ -127,13 +127,13 @@ Ndzendzeleko wa Kaya - [XS] Pending — saved when you click Save + Yi yimile yita hlayisiwa. Susa xitsalwana lexi yimeleke - [XS] This assessment is flagged as needing help. Please describe the issue below as a Home Visit note. + Xikambelo lexi xi kombisiwile tani hi lexi xi lavaka mpfuno. Hi kombela u hlamusela xiphiqo lahansi tani hi tsalwa ro endzela Kaya. Engetela ntsalwa @@ -148,7 +148,7 @@ Engetela Ntsalwa - [XS] Notes are appended to the running log and cannot be edited once saved. + Tinotsi ti engeteriwa eka nxaxamelo lowu yaka emahlweni na swona a tinge hundzuriwi loko ti hlayisiwile. Nghenisa tinotsi tin'wana laha... @@ -169,7 +169,7 @@ Kombela u hlawula mulimi. - [XS] An assessment was submitted too recently for this grower. + Xikambelwana xi rumeriwile kungari ikhale eka murimi loyi. Xikambelo xa wena xi hlayisiwile. @@ -211,6 +211,6 @@ Xihoxo xo susa xikambelo. - [XS] One or more notes could not be saved. Please retry. + Tsalwa rinwe kumbe  yo tala a swi koteki ku hlayisiwa. Hi kombela u ringeta na kambe. diff --git a/Client/Resources/OpenEug.TenTrees.Module.Enrollment/PhotoConsent.ts-ZA.resx b/Client/Resources/OpenEug.TenTrees.Module.Enrollment/PhotoConsent.ts-ZA.resx index 3d1acd4..172bede 100644 --- a/Client/Resources/OpenEug.TenTrees.Module.Enrollment/PhotoConsent.ts-ZA.resx +++ b/Client/Resources/OpenEug.TenTrees.Module.Enrollment/PhotoConsent.ts-ZA.resx @@ -10,27 +10,27 @@ Mulimi Rixaka Kusayina: * - [XS] Please select the grower's consent level for photo use and provide their signature below. + Hi kombela u hlawula xiyimo xa mpfumelelano xa murimi xaku tirhisiwa ka swifaniso, u tlhela u nyika nsayino wa vona la hansi. Nvumelano wu Helela - [XS] You may use my photo with my name identified + Minga tirhisa xifaniso xa Mina mi tlhela mi boxa na Vito ra mina. Nvumelano wu Pimiweke - [XS] You may use my picture in group photos without my name + Minga tirhisa xifaniso xa Mina eka swifaniso swa ntlawa handle ko boxa Vito ra Mina. A Ku na Nvumelano - [XS] You may not use my photo at all + A mi fanelanga ku tirhisa xifaniso xa Mina hi ndlela yihi kumbe yihi. Kombela u nyika kusayina ku tiyisisa nhlayo leyi hlawulekeke ya nvumelano Dirowa kusayina ka wena hi xivomba xa wena kumbe mouse Susa - [XS] I confirm this consent level has been explained to and agreed by the grower + Ndzi tiyisisa leswaku xiyimo lexi xa mpfumelelano xi hlamuseriwile na swona xi pfumeleriwile hi murimi. Hlayisa Nvumelano Vuya eka Nxaxamelo Nkandziyiso wu laviseka... Xiphiqo xi Humelele eka ku Loda Nkandziyiso - [XS] Enrollment not found or you do not have permission to view it. - [XS] Consent has already been recorded as: - [XS] You can update the consent level and signature below. + A hi kumanga nkandziyiso kumbe awuna mpfumelelano wo vona. + Mpfumelelano wu tsariwile ikhale tani hi: + Unga hundzula xiyimo xa mpfumelelano naku sayina laha hansi. Nvumelano wu hlayisiwa... - [XS] Please confirm the consent level before saving - [XS] Please select a consent option + Hi kombela u tiyisisa xiyimo xa mpfumelelano ungasi hlayisa. + Hi kombela u hlawula nxaxamelo wa mpfumelelano. Kusayina swi laveka — kombela u dirowa kusayina ka wena laha henhla Nvumelano wa xifaniso wu hlayisiwile hi ndlela leyi humeleleke Xihoxo xo hlayisa nvumelano wa xifaniso. Kombela u ringeta nakambe. diff --git a/Client/Resources/OpenEug.TenTrees.Module.Grower/Status.ts-ZA.resx b/Client/Resources/OpenEug.TenTrees.Module.Grower/Status.ts-ZA.resx index 68bace0..5f5620d 100644 --- a/Client/Resources/OpenEug.TenTrees.Module.Grower/Status.ts-ZA.resx +++ b/Client/Resources/OpenEug.TenTrees.Module.Grower/Status.ts-ZA.resx @@ -25,7 +25,7 @@ Tsala ku Huma eka Nongonoko - [XS] Grower not found or you do not have permission to view this grower. + Ahi kumanga murimi loyi, kumbe awuna mpfumelelano wo vona murimi loyi. Xiyimo xa Sweswi diff --git a/Client/Resources/OpenEug.TenTrees.Module.Home/Index.resx b/Client/Resources/OpenEug.TenTrees.Module.Home/Index.resx index 3f5f8b7..ac7aa78 100644 --- a/Client/Resources/OpenEug.TenTrees.Module.Home/Index.resx +++ b/Client/Resources/OpenEug.TenTrees.Module.Home/Index.resx @@ -12,6 +12,36 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Welcome to TenTrees Database + + + Enrollment + + + Classes + + + Training + + + Grower + + + Assessment + + + Village + + + Cohort + + + Mentor + + + Tree Type + Workflow diff --git a/Client/Resources/OpenEug.TenTrees.Module.Home/Index.ts-ZA.resx b/Client/Resources/OpenEug.TenTrees.Module.Home/Index.ts-ZA.resx index aff1fdc..c222097 100644 --- a/Client/Resources/OpenEug.TenTrees.Module.Home/Index.ts-ZA.resx +++ b/Client/Resources/OpenEug.TenTrees.Module.Home/Index.ts-ZA.resx @@ -12,6 +12,36 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Amukelekile eka TenTrees Database + + + Nkandziyiso + + + Tiklasi + + + Ku Leha + + + Mulimi + + + Xikambelo + + + Rixaka + + + Cohort + + + Muleriseri + + + Muxaka wa Murhi + Ntirho