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

Add support for translations by default in cookiecutter-django-app #401

Open
BryanttV opened this issue Oct 23, 2023 · 5 comments
Open

Add support for translations by default in cookiecutter-django-app #401

BryanttV opened this issue Oct 23, 2023 · 5 comments

Comments

@BryanttV
Copy link

BryanttV commented Oct 23, 2023

Description

If you add translations in the conf/locale folder they are not rendered on the platform.

To make it work by default on the platform, the following changes can be made. These changes were successfully tested in this plugin

  1. Move all files from conf/locale to locale.

  2. Update MANIFEST.in file to include the new locale folder at the time of package installation.

    recursive-include {{cookiecutter.sub_dir_name}}/locale *
    

These changes will allow translations included in the locale folder to be automatically recognized by the platform. In addition, the make extract_translations and make compile_translations commands should not be modified, as they work with these changes.

@BryanttV BryanttV changed the title Translations are not loaded in cookiecutter-django-app Add support for translations by default in cookiecutter-django-app Oct 24, 2023
@timmc-edx
Copy link
Contributor

It looks like most of our repos use conf/locale. A few have just locale -- but for about half of those it's just a symlink to conf/locale. I'm not sure how to test this, but does it work to just have a recursive-include of conf/locale?

@ehuthmacher
Copy link

Diana Huang
10:07 AM

hi folks. this was a ticket that came in to Arch-BOM and i don't think we're going to get to it: #401 i'm not sure if someone on this team/WG can take a look and make a call on how it should be handled?

#401 Add support for translations by default in cookiecutter-django-app
Description
If you add translations in the conf/locale folder they are not rendered on the platform.
To make it work by default on the platform, the following changes can be made. These changes were successfully tested in this plugin

  1. Move all files from conf/locale to locale.

  2. Update MANIFEST.in file to include the new locale folder at the time of package installation.

    recursive-include {{cookiecutter.sub_dir_name}}/locale *

These changes will allow translations included in the locale folder to be automatically recognized by the platform. In addition, the make extract_translations and make compile_translations commands should not be modified, as they work with these changes.
Comments
1
https://github.com/[openedx/edx-cookiecutters](https://github.com/openedx/edx-cookiecutters)|openedx/edx-cookiecuttersopenedx/edx-cookiecutters | Oct 23rd, 2023 | Added by GitHub

@ehuthmacher
Copy link

from my side, I am not sure as well, but in any case according to latest changes of translations process OEP58, were are translations are saved openedx-translatiosn repo,
https://github.com/openedx/openedx-translations/tree/main/translations it seems the pattern for all python based repo is conf/locale.

@ehuthmacher
Copy link

@OmarIthawi @shadinaif please provide feedback.

@OmarIthawi
Copy link
Member

@shadinaif could you please look into this request. I'd like to see if any of the recent work we've done have changed translations support in this repository.

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

No branches or pull requests

4 participants