IFRCGo / go-api

MIT License
13 stars 6 forks source link

Feature/per translation #2156

Closed k9845 closed 1 month ago

k9845 commented 1 month ago

Addresses

Changes

NOTE: Run following commands

from lang.tasks import ModelTranslator
from per.models import *
# Define a list of models to translate
models_to_translate = [
    FormComponentResponse,
    FormComponentQuestionAndAnswer,
    FormQuestionGroup,
    FormComponent,
    FormAnswer,
    FormQuestion
]

# Display character counts for the specified models
ModelTranslator.show_characters_counts(only_models=models_to_translate)

# Run the translation process for the specified models
ModelTranslator().run(only_models=models_to_translate)

Checklist

Things that should succeed before merging.

Release

If there is a version update, make sure to tag the repository with the latest version.

frozenhelium commented 1 month ago

@szabozoltan69 let's merge and deploy this to the staging

szabozoltan69 commented 1 month ago

Merge and deployment to Staging done.

Running migrations:
  Applying per.0113_auto_20240521_0611... OK
  Applying per.0114_auto_20240521_0801... OK
  Applying per.0115_auto_20240521_0813... OK
  Applying per.0116_auto_20240521_0815... OK
  Applying per.0117_auto_20240522_0529... OK

Also the above shell lines were run until "ModelTranslator().run(only_models=models_to_translate)" fine. (The "ModelTranslator.show_characters_counts(only_models=models_to_translate)"' command did not give any output.)