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

Move Supported Languages to year config #686

Closed
tunetheweb opened this issue Mar 17, 2020 · 1 comment · Fixed by #867
Closed

Move Supported Languages to year config #686

tunetheweb opened this issue Mar 17, 2020 · 1 comment · Fixed by #867
Labels
development Building the Almanac tech stack enhancement New feature or request good first issue Good for newcomers translation world wide web

Comments

@tunetheweb
Copy link
Member

Currently Support Languages is defined in two places:

  1. In validate.py for the Python scripts.
  2. In generate_chapters.js for generating the sitemap.

This also means it’s set once at project level when we might have different languages supported in different years.

We should move this to the year-specific JSON config so we once config isn’t forgotten and so can support different languages per year.

@tunetheweb tunetheweb added enhancement New feature or request development Building the Almanac tech stack labels Mar 17, 2020
@tunetheweb tunetheweb added the translation world wide web label Mar 17, 2020
@tunetheweb tunetheweb changed the title Move Support Languages to year config Move Supported Languages to year config Mar 17, 2020
@tunetheweb
Copy link
Member Author

This has been moved to JSON config now as part of #712 :

{
  "settings": [
    {
      "isLive": true,
      "supported_languages": ["en","es","fr","ja"]
    }
  ],

However we still need to update the generate_chapter.js to use this instead of hardcoding this:

//Chapters may exist but not be ready to be launched so do not include in sitemap
const sitemap_languages = ['en','es','fr','ja'];

We also need to make it year specific so need to update generate_sitemap.js for this. Still think we should do the load in generate_chapter.js (as the config might be used for other things in future) but it should be set in a variable that is then used in generate_sitemap.js.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development Building the Almanac tech stack enhancement New feature or request good first issue Good for newcomers translation world wide web
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant