diff --git a/app/Classes/RcnApi/Entities/InstructionTranslation.php b/app/Classes/RcnApi/Entities/InstructionTranslation.php index 52017cd..d6b8f32 100644 --- a/app/Classes/RcnApi/Entities/InstructionTranslation.php +++ b/app/Classes/RcnApi/Entities/InstructionTranslation.php @@ -12,7 +12,7 @@ class InstructionTranslation implements \JsonSerializable, Arrayable 'warning', 'anticipated', 'assess_and_plan', - 'mitigate_risks', + 'mitigate_risk', 'prepare_to_respond', 'recover' ]; @@ -47,11 +47,11 @@ class InstructionTranslation implements \JsonSerializable, Arrayable public static function createFromRequest(array $array) { $translation = new self(); - $translation->lang = $array['lang']; - $translation->webUrl = $array['webUrl']; - $translation->title = $array['title']; - $translation->description = $array['description']; - $translation->stages = new Collection($array['stages']); + $translation->lang = $array['lang']; + $translation->webUrl = $array['webUrl']; + $translation->title = $array['title']; + $translation->description = $array['description']; + $translation->stages = new Collection($array['stages']); return $translation; } @@ -60,12 +60,12 @@ public static function createFromResponse(array $array) { $translation = new self(); - $translation->id = $array['id']; - $translation->lang = $array['lang']; - $translation->webUrl = $array['webUrl']; - $translation->title = $array['title']; - $translation->description = $array['description']; - $translation->stages = new Collection($array['stages']); + $translation->id = $array['id']; + $translation->lang = $array['lang']; + $translation->webUrl = $array['webUrl']; + $translation->title = $array['title']; + $translation->description = $array['description']; + $translation->stages = new Collection($array['stages']); $translation->createdAt = new \DateTimeImmutable($array['createdAt']); $translation->published = $array['published']; return $translation; diff --git a/app/Classes/RcnApi/Importer/BulkUploadTemplateExport.php b/app/Classes/RcnApi/Importer/BulkUploadTemplateExport.php index ecc3015..86db556 100644 --- a/app/Classes/RcnApi/Importer/BulkUploadTemplateExport.php +++ b/app/Classes/RcnApi/Importer/BulkUploadTemplateExport.php @@ -23,25 +23,31 @@ class BulkUploadTemplateExport implements FromArray, ShouldAutoSize, WithEvents private $nationalSociety; private $region; private $headings = [ - 'Title', 'Description', 'URL', 'Hazard', 'Urgency Level', 'Safety Message' + 'Title', + 'Description', + 'URL', + 'Hazard', + 'Urgency Level', + 'Safety Message' ]; - private $urgencyLevels = '"Immediate,Warning,Anticipated,Assess and Plan,Mitigate Risks,Prepare to Respond,Recover"'; + private $urgencyLevels = '"Immediate,Warning,Anticipated,Assess and Plan,Mitigate Risk,Prepare to Respond,Recover"'; private $eventTypesDropdown = []; private $data; - public function __construct(string $nationalSociety, string $region,array $data, int $maxSupportingMessages) + public function __construct(string $nationalSociety, string $region, array $data, int $maxSupportingMessages) { $eventTypes = EventType::whereNotIn('code', ['other'])->get()->toArray(); $this->nationalSociety = $nationalSociety; $this->eventTypesDropdown = '"' . implode(',', array_map(function ($event) { - return "{$event['name']}"; - }, $eventTypes)) . '"'; + return "{$event['name']}"; + }, $eventTypes)) . '"'; $this->subnational = $region; $this->data = $data; - if($maxSupportingMessages <= 0) $maxSupportingMessages = 3; - for($i = 0; $i< $maxSupportingMessages; $i++){ + if ($maxSupportingMessages <= 0) + $maxSupportingMessages = 3; + for ($i = 0; $i < $maxSupportingMessages; $i++) { $this->headings[] = 'Supporting Message ' . ($i + 1); } diff --git a/resources/assets/js/app.js b/resources/assets/js/app.js index 5207562..397228e 100644 --- a/resources/assets/js/app.js +++ b/resources/assets/js/app.js @@ -42,8 +42,11 @@ Vue.use(VueMoment) Vue.use(TscGTAG) -Vue.use(GoogleAuth, { client_id: window.config.google.client_id, scopes: 'profile email openid' }) -Vue.googleAuth().load() +const googleClientId = window.config?.google?.client_id +if (googleClientId) { + Vue.use(GoogleAuth, { client_id: googleClientId, scopes: 'profile email openid' }) + Vue.googleAuth().load() +} Vue.config.productionTip = false diff --git a/resources/assets/js/pages/content/editWhatnow.vue b/resources/assets/js/pages/content/editWhatnow.vue index 5b70504..2a023a7 100644 --- a/resources/assets/js/pages/content/editWhatnow.vue +++ b/resources/assets/js/pages/content/editWhatnow.vue @@ -343,7 +343,7 @@ export default { 'warning', 'anticipated', 'assess_and_plan', - 'mitigate_risks', + 'mitigate_risk', 'prepare_to_respond', 'recover' ], @@ -358,7 +358,7 @@ export default { { value: 'disaster_risk_reduction', text: this.$t('content.edit_whatnow.disaster_risk_reduction'), - stages: ['assess_and_plan', 'mitigate_risks', 'prepare_to_respond'], + stages: ['assess_and_plan', 'mitigate_risk', 'prepare_to_respond'], description: this.$t('content.edit_whatnow.disaster_risk_reduction_description') }, { diff --git a/resources/assets/js/pages/content/whatnowContentItem.vue b/resources/assets/js/pages/content/whatnowContentItem.vue index 385ecf8..47e79e3 100644 --- a/resources/assets/js/pages/content/whatnowContentItem.vue +++ b/resources/assets/js/pages/content/whatnowContentItem.vue @@ -140,7 +140,7 @@ export default { { value: 'disaster_risk_reduction', text: this.$t('content.edit_whatnow.disaster_risk_reduction'), - stages: ['assess_and_plan', 'mitigate_risks', 'prepare_to_respond'], + stages: ['assess_and_plan', 'mitigate_risk', 'prepare_to_respond'], description: this.$t('content.edit_whatnow.disaster_risk_reduction_description') }, { @@ -271,7 +271,7 @@ export default { .btn { font-size: 14px; } - } + } } .hazard-cards-container { diff --git a/resources/assets/js/pages/content/whatnowSummary.vue b/resources/assets/js/pages/content/whatnowSummary.vue index a60769b..e4ff85d 100644 --- a/resources/assets/js/pages/content/whatnowSummary.vue +++ b/resources/assets/js/pages/content/whatnowSummary.vue @@ -36,7 +36,7 @@ export default { 'warning', 'anticipated', 'assess_and_plan', - 'mitigate_risks', + 'mitigate_risk', 'prepare_to_respond', 'recover' ], @@ -50,7 +50,7 @@ export default { { value: 'disaster_risk_reduction', text: this.$t('content.edit_whatnow.disaster_risk_reduction'), - stages: ['assess_and_plan', 'mitigate_risks', 'prepare_to_respond'], + stages: ['assess_and_plan', 'mitigate_risk', 'prepare_to_respond'], description: this.$t('content.edit_whatnow.disaster_risk_reduction_description') }, { @@ -123,4 +123,4 @@ export default { color: $grey; } } - \ No newline at end of file + diff --git a/resources/assets/js/store/models/contentTranslation.js b/resources/assets/js/store/models/contentTranslation.js index 39d7e5a..7b501d2 100644 --- a/resources/assets/js/store/models/contentTranslation.js +++ b/resources/assets/js/store/models/contentTranslation.js @@ -24,7 +24,7 @@ const createStages = (stages) => { warning: stages.warning || [], anticipated: stages.anticipated || [], assess_and_plan: stages.assess_and_plan || [], - mitigate_risks: stages.mitigate_risks || [], + mitigate_risk: stages.mitigate_risk || [], prepare_to_respond: stages.prepare_to_respond || [], recover: stages.recover || [] } diff --git a/resources/lang/am.json b/resources/lang/am.json index 179dbf2..874f3ee 100644 --- a/resources/lang/am.json +++ b/resources/lang/am.json @@ -440,7 +440,7 @@ "warning": "ማስጠንቀቂያ", "anticipated": "በቅድሚያ የተጠበቀ", "assess_and_plan":"ግምገማ እና እቅድ", - "mitigate_risks":"አደጋዎችን መቀነስ", + "mitigate_risks":"አደጋን መቀነስ", "prepare_to_respond":"ለመልስ ዝግጁ ይሁኑ", "recover": "መልሶ ማግኛት" }, @@ -536,7 +536,7 @@ "recover_extra": "እነዚህ አደገኛ ሁኔታን ተከትሎ አደጋን ለመቀነስ የሚወሰዱ የመከላከያ እርምጃዎች ናቸው።", "anticipated": "በቅድሚያ የተጠበቀ", "assess_and_plan": "ግምገማ እና እቅድ", - "mitigate_risks": "አደጋዎችን መቀነስ", + "mitigate_risks": "አደጋን መቀነስ", "prepare_to_respond": "ለመልስ ዝግጁ ይሁኑ", "updated": "የተሻሻለ", "download_icon": "ምልክቶችን ያውርዱ", diff --git a/resources/lang/ar.json b/resources/lang/ar.json index 499cabd..46fd668 100644 --- a/resources/lang/ar.json +++ b/resources/lang/ar.json @@ -450,7 +450,7 @@ "warning": "تحذير", "anticipated": "متوقع", "assess_and_plan":"تقييم وتخطيط", - "mitigate_risks":"تخفيف المخاطر", + "mitigate_risks":"تخفيف المخاطرة", "prepare_to_respond":"الاستعداد للاستجابة", "recover": "التعافي" }, @@ -560,7 +560,7 @@ "recover_extra": "اتخذ هذه الإجراءات بعد وقوع الحدث الخطير لضمان السلامة.", "anticipated": "متوقع", "assess_and_plan": "تقييم وتخطيط", - "mitigate_risks": "تخفيف المخاطر", + "mitigate_risks": "تخفيف المخاطرة", "prepare_to_respond": "الاستعداد للاستجابة", "updated": "تم التحديث", "download_icon": "تنزيل الأيقونة", diff --git a/resources/lang/de.json b/resources/lang/de.json index 8d5fd09..aa4e494 100644 --- a/resources/lang/de.json +++ b/resources/lang/de.json @@ -442,7 +442,7 @@ "warning": "Warnung", "anticipated": "Erwartet", "assess_and_plan":"Bewerten und planen", - "mitigate_risks":"Risiken mindern", + "mitigate_risks":"Risiko mindern", "prepare_to_respond":"Auf die Reaktion vorbereiten", "recover": "Wiederherstellen" }, @@ -538,7 +538,7 @@ "recover_extra": "Dies sind Schutzmaßnahmen, die zu ergreifen sind, um das Risiko nach einem gefährlichen Ereignis zu verringern.", "anticipated": "Erwartet", "assess_and_plan": "Bewerten und planen", - "mitigate_risks": "Risiken mindern", + "mitigate_risks": "Risiko mindern", "prepare_to_respond": "Auf die Reaktion vorbereiten", "updated": "aktualisiert", "download_icon": "Icon herunterladen", diff --git a/resources/lang/en.json b/resources/lang/en.json index 393e2e1..a16aaaa 100644 --- a/resources/lang/en.json +++ b/resources/lang/en.json @@ -85,7 +85,6 @@ "app_detail": "App Detail", "all_terms": "All Terms and Conditions" }, - "documentation": { "heading": "IFRC NS Preparedness Messages API Documentation", "sidebar": { @@ -237,7 +236,6 @@ "api_usage": "This is where you can see who is using the API and what applications are being built with it.", "wellcome": "Welcome", "wellcome_description": "Here you can edit and publish IFRC National Society Preparedness Messages content." - }, "languages": { "am": "አማርኛ", @@ -464,9 +462,9 @@ "immediate": "Immediate", "warning": "Warning", "anticipated": "Anticipated", - "assess_and_plan":"Assess and Plan", - "mitigate_risks":"Mitigate Risks", - "prepare_to_respond":"Prepare to Respond", + "assess_and_plan": "Assess and Plan", + "mitigate_risks": "Mitigate Risk", + "prepare_to_respond": "Prepare to Respond", "recover": "Recover" }, "content": { @@ -575,7 +573,7 @@ "recover_extra": "Take these actions after the hazard event to ensure safety.", "anticipated": "Anticipated", "assess_and_plan": "Assess and Plan", - "mitigate_risks": "Mitigate Risks", + "mitigate_risks": "Mitigate Risk", "prepare_to_respond": "Prepare to Respond", "updated": "updated", "download_icon": "Download Icon", @@ -1073,4 +1071,4 @@ "draft": "Draft", "bulkUploadDraft": "Message File Upload Draft" } -} +} \ No newline at end of file diff --git a/resources/lang/es.json b/resources/lang/es.json index bd82fe8..8adc7b3 100644 --- a/resources/lang/es.json +++ b/resources/lang/es.json @@ -450,7 +450,7 @@ "warning": "Advertencia", "anticipated": "Anticipado", "assess_and_plan": "Evaluar y Planificar", - "mitigate_risks": "Mitigar Riesgos", + "mitigate_risks": "Mitigar Riesgo", "prepare_to_respond": "Prepararse para Responder", "recover": "Recuperación" }, @@ -560,7 +560,7 @@ "recover_extra": "Toma estas acciones después del evento de peligro para garantizar la seguridad.", "anticipated": "Anticipado", "assess_and_plan": "Evaluar y Planificar", - "mitigate_risks": "Mitigar Riesgos", + "mitigate_risks": "Mitigar Riesgo", "prepare_to_respond": "Prepararse para Responder", "updated": "actualizado", "download_icon": "Descargar Icono", diff --git a/resources/lang/fr.json b/resources/lang/fr.json index 4ab0e83..41bb9dd 100644 --- a/resources/lang/fr.json +++ b/resources/lang/fr.json @@ -450,7 +450,7 @@ "warning": "Avertissement", "anticipated": "Anticipé", "assess_and_plan": "Évaluer et Planifier", - "mitigate_risks": "Atténuer les Risques", + "mitigate_risks": "Atténuer le Risque", "prepare_to_respond": "Se Préparer à Réagir", "recover": "Rétablissement" }, @@ -560,7 +560,7 @@ "recover_extra": "Prenez ces mesures après l'événement dangereux pour assurer la sécurité.", "anticipated": "Anticipé", "assess_and_plan": "Évaluer et Planifier", - "mitigate_risks": "Atténuer les Risques", + "mitigate_risks": "Atténuer le Risque", "prepare_to_respond": "Se Préparer à Réagir", "updated": "mis à jour", "download_icon": "Télécharger l'Icône", diff --git a/resources/lang/ht.json b/resources/lang/ht.json index a27e2e7..8af2708 100644 --- a/resources/lang/ht.json +++ b/resources/lang/ht.json @@ -439,7 +439,7 @@ "warning": "Avètisman", "anticipated": "Antisipe", "assess_and_plan":"Evalye epi Planifye", - "mitigate_risks":"Diminye Risk yo", + "mitigate_risks":"Diminye Risk", "prepare_to_respond":"Prepare pou Reponn", "recover": "Rekipere" }, @@ -534,7 +534,7 @@ "recover_extra": "Sa yo se aksyon pwotektiv pran pou diminye risk aprè yon evènman danjere.\n", "anticipated": "Antisipe", "assess_and_plan": "Evalye epi Planifye", - "mitigate_risks": "Diminye Risk yo", + "mitigate_risks": "Diminye Risk", "prepare_to_respond": "Prepare pou Reponn", "updated": "Ajou", "download_icon": "Telechaje ikòn", diff --git a/resources/lang/id.json b/resources/lang/id.json index ab7a98a..7335ad6 100644 --- a/resources/lang/id.json +++ b/resources/lang/id.json @@ -442,7 +442,7 @@ "warning": "Warning", "anticipated": "Anticipated", "assess_and_plan":"Assess and Plan", - "mitigate_risks":"Mitigate Risks", + "mitigate_risks":"Mitigate Risk", "prepare_to_respond":"Prepare to Respond", "recover": "Recover" }, @@ -538,7 +538,7 @@ "recover_extra": "Berikut ini adalah tindakan perlindungan yang harus dilakukan untuk mengurangi risiko setelah terjadi peristiwa berbahaya.", "anticipated": "Anticipated", "assess_and_plan": "Assess and Plan", - "mitigate_risks": "Mitigate Risks", + "mitigate_risks": "Mitigate Risk", "prepare_to_respond": "Prepare to Respond", "updated": "diperbarui", "download_icon": "Unduh Ikon", diff --git a/resources/lang/it.json b/resources/lang/it.json index a56f235..a93b6f8 100644 --- a/resources/lang/it.json +++ b/resources/lang/it.json @@ -442,7 +442,7 @@ "warning": "Avviso", "anticipated": "Previsto", "assess_and_plan":"Valuta e Pianifica", - "mitigate_risks":"Mitiga i Rischi", + "mitigate_risks":"Mitiga il Rischio", "prepare_to_respond":"Preparati a Rispondere", "recover": "Recupera" }, @@ -538,7 +538,7 @@ "recover_extra": "Queste sono le misure protettive da prendere per ridurre il rischio in seguito a un evento pericoloso.", "anticipated": "Previsto", "assess_and_plan": "Valuta e Pianifica", - "mitigate_risks": "Mitiga i Rischi", + "mitigate_risks": "Mitiga il Rischio", "prepare_to_respond": "Preparati a Rispondere", "updated": "aggiornato", "download_icon": "Icona Download", diff --git a/resources/lang/my.json b/resources/lang/my.json index e2adbcf..74a40c7 100644 --- a/resources/lang/my.json +++ b/resources/lang/my.json @@ -439,7 +439,7 @@ "warning": "သတိပေးချက်", "anticipated": "မျှော်မှန်းထားသည်", "assess_and_plan":"အကဲဖြတ်ပြီး စီစဉ်ပါ", - "mitigate_risks":"အန္တရာယ်များကို လျှော့ချပါ", + "mitigate_risks":"အန္တရာယ်ကို လျှော့ချပါ", "prepare_to_respond":"တုံ့ပြန်ရန် ပြင်ဆင်ပါ", "recover": "ပြန်လည်နာလန်ထူပါ" }, @@ -535,7 +535,7 @@ "recover_extra": "ဤအရာများသည် ဘေးအန္တရာယ်ရှိသော ဖြစ်စဉ်တစ်ခု ဖြစ်ပြီးနောက် ဘေးအန္တရာယ်လျှော့ချရန် ကြိုတင်ကာကွယ်သည့် လုပ်ဆောင်ချက်များဖြစ်သည်။", "anticipated": "မျှော်မှန်းထားသည်", "assess_and_plan": "အကဲဖြတ်ပြီး စီစဉ်ပါ", - "mitigate_risks": "အန္တရာယ်များကို လျှော့ချပါ", + "mitigate_risks": "အန္တရာယ်ကို လျှော့ချပါ", "prepare_to_respond": "တုံ့ပြန်ရန် ပြင်ဆင်ပါ", "updated": "မွမ်းမံထားပြီး", "download_icon": "ဒေါင်းလုပ်အိုင်ကွန်", diff --git a/resources/lang/ne.json b/resources/lang/ne.json index a12001f..dff7f76 100644 --- a/resources/lang/ne.json +++ b/resources/lang/ne.json @@ -439,7 +439,7 @@ "warning": "चेतावनी", "anticipated": "अपेक्षित", "assess_and_plan":"मूल्याङ्कन र योजना", - "mitigate_risks":"जोखिमहरू कम गर्नुहोस्", + "mitigate_risks":"जोखिम कम गर्नुहोस्", "prepare_to_respond":"प्रतिक्रिया दिन तयार हुनुहोस्", "recover": "पुनर्प्राप्त गर्नुहोस्" }, @@ -535,7 +535,7 @@ "recover_extra": "खतरनाक घटना भैरहेको बेला यी सुरक्षित कार्यहरु जोखिम घटाउनको लागि अपनाउनु पर्छ ।", "anticipated": "अपेक्षित", "assess_and_plan": "मूल्याङ्कन र योजना", - "mitigate_risks": "जोखिमहरू कम गर्नुहोस्", + "mitigate_risks": "जोखिम कम गर्नुहोस्", "prepare_to_respond": "प्रतिक्रिया दिन तयार हुनुहोस्", "updated": "अध्यावधिक गरिएको", "download_icon": "आईकन\/संकेत डाउनलोड गर्नुहोस", diff --git a/resources/lang/pt.json b/resources/lang/pt.json index 5a651f8..792961c 100644 --- a/resources/lang/pt.json +++ b/resources/lang/pt.json @@ -442,7 +442,7 @@ "warning": "Aviso", "anticipated": "Antecipado", "assess_and_plan":"Avaliar e Planejar", - "mitigate_risks":"Mitigar Riscos", + "mitigate_risks":"Mitigar Risco", "prepare_to_respond":"Preparar para responder", "recover": "Recuperar" }, @@ -538,7 +538,7 @@ "recover_extra": "Estas são ações de proteção a tomar para reduzir o risco após um evento desastroso.", "anticipated": "Previsto", "assess_and_plan": "Avaliar e Planejar", - "mitigate_risks": "Mitigar Riscos", + "mitigate_risks": "Mitigar Risco", "prepare_to_respond": "Preparar para responder", "updated": "atualizado", "download_icon": "Descarregar Ícone", diff --git a/resources/lang/ru.json b/resources/lang/ru.json index 6eed489..7866f9e 100644 --- a/resources/lang/ru.json +++ b/resources/lang/ru.json @@ -442,7 +442,7 @@ "warning": "Предупреждение", "anticipated": "Ожидаемый", "assess_and_plan":"Оценить и спланировать", - "mitigate_risks":"Смягчить риски", + "mitigate_risks":"Смягчить риск", "prepare_to_respond":"Подготовиться к реагированию", "recover": "Восстановиться" }, @@ -538,7 +538,7 @@ "recover_extra": "Это защитные действия, предпринимаемые для снижения риска после опасного события.", "anticipated": "Ожидаемый", "assess_and_plan": "Оценить и спланировать", - "mitigate_risks": "Смягчить риски", + "mitigate_risks": "Смягчить риск", "prepare_to_respond": "Подготовиться к реагированию", "updated": "обновлен", "download_icon": "Значок «Загрузить»", diff --git a/resources/lang/tr.json b/resources/lang/tr.json index 3492d4e..4d037b0 100644 --- a/resources/lang/tr.json +++ b/resources/lang/tr.json @@ -442,7 +442,7 @@ "warning": "Uyarı", "anticipated": "Beklenen", "assess_and_plan":"Değerlendirin ve Planlayın", - "mitigate_risks":"Riskleri Azaltın", + "mitigate_risks":"Riski Azaltın", "prepare_to_respond":"Yanıt Vermeye Hazırlanın", "recover": "İyileş" }, @@ -538,7 +538,7 @@ "recover_extra": "Bir tehlikeden sonra riski azaltma adına korunma eylemleri bunlardır.", "anticipated": "Beklenen", "assess_and_plan": "Değerlendirin ve Planlayın", - "mitigate_risks": "Riskleri Azaltın", + "mitigate_risks": "Riski Azaltın", "prepare_to_respond": "Yanıt Vermeye Hazırlanın", "updated": "güncellendi", "download_icon": "Simge İndir", diff --git a/resources/lang/ur.json b/resources/lang/ur.json index 1c8a11b..0c01a40 100644 --- a/resources/lang/ur.json +++ b/resources/lang/ur.json @@ -442,7 +442,7 @@ "warning": "انتباہ", "anticipated": "متوقع", "assess_and_plan":"جائزہ لیں اور منصوبہ بنائیں", - "mitigate_risks":"خطرات کو کم کریں", + "mitigate_risks":"خطرے کو کم کریں", "prepare_to_respond":"جواب دینے کے لیے تیار رہیں", "recover": "بحال کریں" }, @@ -538,7 +538,7 @@ "recover_extra": "یہ حفاظتی اقدامات آفت کے بعدخطرات کو کم کرنے کے لئے کیے جانے والے حفاظتی اقدامات ہیں۔", "anticipated": "متوقع", "assess_and_plan": "جائزہ لیں اور منصوبہ بنائیں", - "mitigate_risks": "خطرات کو کم کریں", + "mitigate_risks": "خطرے کو کم کریں", "prepare_to_respond": "جواب دینے کے لیے تیار رہیں", "updated": "تازہ ترین", "download_icon": "ڈاؤن لوڈ نشان",