IFRCGo / go-web-app

GO Web application! GO is a Red Cross Red Crescent platform to connect information on emergency needs with the right response.
https://go.ifrc.org
MIT License
6 stars 1 forks source link

[PROD] User content translation issues #525

Open tovari opened 1 year ago

tovari commented 1 year ago

We have noticed a few weird cases after the first few FRs got translated:

Tasks

tovari commented 1 year ago
tovari commented 3 months ago
frozenhelium commented 3 months ago

Hey @tovari! For this, we're currently not storing the generated and user defined part separately! So, we won't able to do this for the existing field reports / emergencies. Going forward we can store the user defined part of title separately and only translate those.

CC: @udaynwa @samshara

samshara commented 1 month ago
  • [ ] Emergency and FR title translations should be composed from translated components: ISO3 code shouldn't be translated, disaster type translations are in the database, only the user added should be translated by the translation api. Translation of title also changes the country #1032 is also related to this.

@tovari

Auto-generated titles in the IFRC GO system are currently translated as whole units using the Translation API. To improve accuracy and consistency, translations should be composed by translating individual components of the titles.

Example:

Technical Details

Auto-generated Titles in IFRC GO:

  1. DREF Application
    • {Country} {Disaster} {Year}
  2. DREF Operational Update
    • {Country} {Disaster} {Year}
  3. DREF Final Report
    • {Country} {Disaster} {Year}
  4. Flash Update
    • {Countries} - {Hazard} {Date}
  5. Field Report / Emergency
    • {ISO3}: COVID-19
    • {ISO3}: COVID-19 #{Field Report Number} ({Date})
    • {ISO3}: {Disaster} - {Date} {SUMMARY} #{Field Report Number} ({Date})
    • {ISO3}: {Disaster} - {Date} {SUMMARY}

Current Implementation

Planned Solution

Migration of Field Report: Possible Cases

  1. Structure and Data Match

    • Previous Summary: NPL: Storm - 2022/10/12 100 people displaced due to flooding
    • Country: NPL
    • Disaster: Storm
    • Date: 2022-10-12
    • New Summary: people displaced due to flooding
    • New Title (en): NPL: Storm - 2022/10/12 100 people displaced due to flooding
  2. Structure Match and Data Mismatch

    • Previous Summary: NPL: Storm - 2022/10/12 100 people displaced due to flooding
    • Country: IND
    • Disaster: Storm
    • Date: 2022-10-12
    • New Summary: people displaced due to flooding
    • New Title (en): ?
  3. Structure Mismatch

    • Previous Summary: (Storm) 100 people affected storm NPL 2021-10-12
    • Country: IND
    • Disaster: Storm
    • Date: 2022-10-12
    • New Summary: ?
    • New Title (en): ?

Field Report Title Analysis using Production Database

Field Report Count: 16,557

General Field Report Count: 14,604

COVID Field Report Count: 1,953

Overall Count

Additional Data

[!NOTE]
We also need to consider how to handle cases of data mismatch, where the disaster in the field report and the type of disaster in the emergency report do not match.

cc @udaynwa @tnagorra @thenav56

tovari commented 2 weeks ago

@samshara, as we discussed in the developer call, we don't need to do this (change titles, modify translated titles) for existing emergencies, FRs. We need to this for future emergencies and FRs.