Skip to content
This repository was archived by the owner on May 26, 2025. It is now read-only.

Multilingual support#2

Open
brockfanning wants to merge 114 commits intoONSdigital:masterfrom
brockfanning:multilingual
Open

Multilingual support#2
brockfanning wants to merge 114 commits intoONSdigital:masterfrom
brockfanning:multilingual

Conversation

@brockfanning
Copy link

@brockfanning brockfanning commented Jul 9, 2018

This PR was created to propose multilingual functionality. However, additional tweaks and improvements have been added. Here is a list of everything included in this PR:

  1. Replacing words/phrases with variable references
  2. A multilingual.html include to set various variables to be used throughout the platform
  3. A language-toggle for the nav bar, and associated styling
    • Included is a tweak to the accessibility toggle on mobile - only one of the 2 accessibility buttons will display on mobile. This was to make room for the mobile language switcher.
  4. Mechanism for javascript translation
  5. Includes code from a few PRs that were submitted to the sdg-indicators repo, including:
  6. A couple of improvements that were made in sdg-indicators after this repository was created:
    • Indicator sorting with the indicator_sort_order field
    • HTML map embedding with the embedded_map_html field
  7. Allows for control of the main navigation through the _config.yml file.
  8. Hides empty metadata fields and graph footer items on indicator pages
  9. On indicator pages, display the goal title in the H1, rather than duplicating the indicator title which is also in the H2.
  10. To allow for custom chart types:
    • does not require either "line" or "bar", and instead allows any chart type
    • allow for overrides of Chart.js configuration, based on the existence of a global variable
    • include an example of a custom Chart.js type: "binary" (for yes/no graphs)
  11. First draft of some documentation (docs folder)

The multilingual functionality relies on a "translations" object in the site data, which is fed by an external data source built by the sdg-translations repository. Here is an example from config.yml that accomplishes that.

More details are here: ONSdigital/sdg-indicators#2807

@Norric1Admin
Copy link

@shaneporter Please could you give me admin access to this repo, so I can merge Brock's pull request? Many thanks, Chris (ONS SDGs team)

@shaneporter
Copy link
Contributor

Is this something you can help with @dougmet? Cheers.

@dougmet
Copy link

dougmet commented Nov 19, 2018

Hi @brockfanning @shaneporter I'll do my best.

@dougmet
Copy link

dougmet commented Nov 19, 2018

Hi @Norric1Admin . After the transfer I needed someone from ONSdigital to make me an admin but never got it. Probably not appropriate now for me so will see who I can contact.

@Norric1Admin
Copy link

@brockfanning Is the sdg-theme repo still used for anything, or can this be deleted?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants