openedx / edx-cookiecutters

Open edx public templates for apps, libraries and services.
Apache License 2.0
25 stars 21 forks source link

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

Open BryanttV opened 8 months ago

BryanttV commented 8 months ago

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.

timmc-edx commented 8 months ago

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 commented 4 months ago

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: https://github.com/openedx/edx-cookiecutters/issues/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 commented 4 months ago

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 commented 4 months ago

@OmarIthawi @shadinaif please provide feedback.

OmarIthawi commented 4 months ago

@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.