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

Feat/51 show names in tibetan #188

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Conversation

gythaogg
Copy link
Collaborator

@gythaogg gythaogg commented Nov 15, 2024

This pull request introduces significant changes to support multilingual capabilities, particularly focusing on the Tibetan language, within the apis_ontology application. The main updates include the integration of the django-parler library for translation management, modifications to models to handle translations, and updates to forms and admin interfaces to support these changes.

Multilingual Support Enhancements:

  • Model Updates for Translations:

    • Added TranslatableModel and TranslatedFields to the Person model to support multilingual names. [1] [2]
    • Created PersonTranslation model to store translations for the Person model.
  • Form and Admin Adjustments:

    • Updated PersonForm to use TranslatedField and TranslatableModelForm for handling multilingual input. [1] [2]
    • Registered Person model in the Django admin with TranslatableAdmin to manage translations.
  • Filter and Query Adjustments:

    • Modified filtersets to use translations for name searches and added language-based filtering. [1] [2] [3]
    • Added PersonQuerySet to handle translated queries.
  • Management Command for Transliteration:

    • Added a management command to transliterate Person names into Tibetan script using pyewts.
  • Settings and Middleware Updates:

    • Integrated django-parler settings and middleware to enable multilingual support and language switching. [1] [2]

These changes collectively enhance the application's ability to handle multiple languages, particularly focusing on Tibetan, improving both backend data management and frontend user interfaces.

@gythaogg gythaogg force-pushed the feat/51-show-names-in-Tibetan branch 5 times, most recently from 3eca07d to 50cfc0b Compare November 16, 2024 10:54
@gythaogg gythaogg marked this pull request as draft November 16, 2024 10:54
@gythaogg gythaogg force-pushed the feat/51-show-names-in-Tibetan branch 5 times, most recently from d09b906 to db5aeb6 Compare November 16, 2024 21:35
@gythaogg gythaogg linked an issue Nov 16, 2024 that may be closed by this pull request
@gythaogg gythaogg force-pushed the feat/51-show-names-in-Tibetan branch 5 times, most recently from 4fba520 to 29c222f Compare November 17, 2024 01:47
- modified entity form and filter set for person
- parler works but migrations are buggy; needed some editing
- post_save signal to save translations/transliterations
automatically ONLY on create
- management command to transliterate all Person names
- modified querysets for work and instances to show author name
- according to the selected language
- TODO: Use HistoryGenericTable and fix the bug accessing translated
field there (currently using tables.table)
@gythaogg gythaogg force-pushed the feat/51-show-names-in-Tibetan branch from 29c222f to 4bef6a2 Compare November 20, 2024 11:59
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

Successfully merging this pull request may close these issues.

Display names in Tibetan
1 participant