Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🔧🌐 Automated Config Issue Form - GitHub Actions doesn't fill in Translations correctly #65

Closed
sebastianbarry opened this issue Feb 6, 2024 · 8 comments

Comments

@sebastianbarry
Copy link
Contributor

sebastianbarry commented Feb 6, 2024

The automated config that was created (#64) from the issue form I filled out (#63) filled in the intro > translated text > en field with the es translations I put in. I filled in both sections for EN and ES in the issue form, but it only created one translated text field, en, and put the EN translations into it.

  "intro": {
    "program_or_study": "program",
    "start_month": "01",
    "start_year": "2024",
    "mode_studied": "e-bike",
    "program_admin_contact": "For questions about the program, please contact Robera Tasissa (robera.tasissa@dc.gov) or Laura Pimentel (laura.pimentel@dc.gov).",
    "deployment_partner_name": "Energy Administration at District of Columbia Department of Energy and Environment",
    "translated_text": {
      "en": {
        "deployment_partner_name": "Administración de Energía en el Departamento de Energía y Medio Ambiente del Distrito de Columbia",
        "deployment_name": "Proyecto de biblioteca de bicicletas eléctricas",
        "summary_line_1": "La EA en DOEE tiene como objetivo incentivar a los viajeros a adoptar modos de transporte no contaminantes y energéticamente eficientes y maximizar los beneficios de la calidad del aire.",
        "summary_line_2": "Este programa piloto proporciona bicicletas eléctricas a participantes del programa de bajos ingresos en el suroeste de DC.",
        "summary_line_3": "Si participa en el programa, esta aplicación puede ayudarle a registrar sus viajes y competir contra otros en beneficio de nuestro medio ambiente.",
        "short_textual_description": "El piloto permitirá a los residentes del distrito probar varios tipos de bicicletas eléctricas sin costo y fomentará un cambio de modo que reduzca las emisiones, aumente la movilidad de los residentes de bajos ingresos y demuestre un concepto de biblioteca de bicicletas eléctricas aplicable a la vida cotidiana. Al final del piloto, los datos rastreados mediante la aplicación NREL Openpath se utilizarán para comprender el comportamiento de uso de bicicletas eléctricas, el cambio de modo y cualquier barrera para la adopción.",
        "why_we_collect": "Los datos recopilados durante el programa se utilizarán para comprender: cómo se utilizan las bicicletas eléctricas, incluido cuándo y con qué frecuencia, la distancia recorrida y el tipo preferido de bicicletas eléctricas.",
        "research_questions": [
          "¿Comportamiento de viaje con bicicletas eléctricas?",
          "¿Barreras para el uso y la adopción de bicicletas eléctricas en el suroeste de DC?",
          ""
        ]
      }
    }
  },
@sebastianbarry
Copy link
Contributor Author

@shankari @Abby-Wheelis I created an issue for my comments!

@sebastianbarry
Copy link
Contributor Author

sebastianbarry commented Feb 6, 2024

The other consideration I wanted to make sure - If someone fills out the form and they (1) include another language in the translations section, and (2) choose default demographics option, then will the labelTemplate field include the "Answered" translation for that language?

  "survey_info": {
    "surveys": {
      "UserProfileSurvey": {
        "formPath": "json/demo-survey-v2.json",
        "version": 1,
        "compatibleWith": 1,
        "dataKey": "manual/demographic_survey",
        "labelTemplate": {
          "en": "Answered",
          "es": "Contestada"
        }
      }
    },

It wasn't a problem on this issue but I just noticed this field as I was going through this PR #64

@Abby-Wheelis
Copy link
Member

For the first problem you're having, it looks like in your issues that you did not select a second language in the dropdown, so both the "english" and the "spanish" sections say that they are EN -- we allow people to specify the language code, could you try editing the comment in the auto-generated issue to so it says 'es' under the heading "second language"

This might raise a broader question of if we should change the defaults...

@Abby-Wheelis
Copy link
Member

For the second issue, that is going to be a problem - there's a place for people to input the translations in the languages, following a format, but I have managed to hardcode that those translations get slotted in as 'en' and 'es' no matter what the languages are, great catch, thank you! We'll have to re-work the way we handle that in the parsing and probably make those fields required since we need them no matter if it's the default or a custom survey.

@shankari
Copy link
Contributor

shankari commented Feb 7, 2024

@Abby-Wheelis @sebastianbarry I am not sure that we need to support languages beyond en and es in the config. If we have other languages (such as lo), we will need to translate all of the text in the app anyway, and we can just modify the config manually. If we can get this to work reliably for the common US case (en and es only), I think it is a win for now. Once we integrate the app text translation with locize and allow participants to potentially provide us automated translations, we can revisit that decision.

@Abby-Wheelis
Copy link
Member

@shankari should I hardcode the two languages as en and es, then? Right now you could technically specify any two langauges from en, es, and lo if you wanted to. Or, should we just know that anything other than the common US case of en and es is going to take more manual review and editing?

@shankari
Copy link
Contributor

shankari commented Feb 7, 2024

@Abby-Wheelis I think we should hardcode en and es and get this rolling for now. We can then design new languages more carefully in a future round.

@sebastianbarry
Copy link
Contributor Author

@shankari @Abby-Wheelis

Since the first issue I was having was my user error, and the second issue we decided to go with hardcoded values, then this issue is good to close.

I filed a new Issue Form (#66) and automatic PR (#67)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants