-
Notifications
You must be signed in to change notification settings - Fork 228
Technical Tutorial on Setting Up a New Language
For the purposes of this tutorial, we assume the new language is Portuguese, with the ISO 639-1 2-letter language code PT
You must add three new scope entries:
- the entire
pt
directory - the
pt
"lessons" directory (updated as needed to match to the directory name as eventually translated by the PT team) - the
pt
"retired lessons" directory (updated as needed to match to the directory name as eventually translated by the PT team)
defaults:
- scope:
path: "pt"
values:
lang: "pt"
- scope:
path: "pt/licoes"
values:
lesson: true
- scope:
path: "pt/licoes/retirado"
values:
lesson: false
retired: true
In _config.yml
we want to temporarily exclude these pages from being built:
exclude:
- deprecated
- vendor
- Gemfile
- Gemfile.lock
- archive
- pt
We will remove this exclusion when it is time to publish.
In snippets.yml
every entry needs to have a new line added with pt:
. As needed, follow the pattern you see in existing snippets, such as the unique pattern used for the menu links:
# top nav bar
menu-home:
en: /
es: /es
fr: /fr
pt: /pt
menu-about:
en: About
es: Acerca
fr: À propos
pt:
menu-about-overview:
en:
title: About PH
link: /en/about
es:
title: Acerca
link: /es/acerca-de
fr:
title: À propos
link: /fr/apropos
pt:
title:
link:
As with all YAML, you must be exact about whitespace. After making all these changes, I strongly recommend trying a test build locally to see if you have any YAML errors here before moving on.
Note: Do NOT add the new language to language-list
at the top of the file until you are ready to publish
Create a new directory /pt
and copy in the core pages from the /en
folder, not including the lessons directory.
Make the following edits to each file:
- Remove any extra YAML fields like
redirect_only
(these are needed to maintain our old URLs from prior to our multilingual restructuring). The only fields that you should keep are:title
layout
-
skip_validation
(if present) -
skip_concordance
(if present)
- Add the
original
field to each page, and set it to the English base filename (soabout.md
should haveoriginal: about
)
Create a directory for lessons and retired lessons, and add an empty file in the retired folder called .keep
which will make sure the new folders get commited. For PT, we created the directory structure: /pt/licoes/retirado/.keep
. (If the PT team decides to change those directory names, make sure to change the entries in _config.yml
to match their decisions.
Once the language team has settled on a logo variant and a theme color, add the hexadecimal color code to snippets.yml
under background_color
Using that same color, go to the "ProgrammingHistorian logos" folder on the [email protected] Google drive and make new copies of the source files, the logo with and without the URL.
- Adjust the filenames to match the naming convention of the other files
- Adjust the color, URL, and logo typography as needed
- Download the new files as SVG and save them in
/images/logos
Edit /feed.xml
and add ensure the new languages are included:
{% assign pages = site.pages | where:'layout','lesson'| where:'lang', 'pt' | sort:'translation_date' | reverse %}
{% for page in pages limit:10 %}
{% include feed-item.html %}
{% endfor %}
- Add the language abbreviation to
available_languages
- Edit
_config.yml
to remove the new language directory from the "excluded" paths. This means Jekyll will now attempt to build it. - Ensure that all checks pass.
- Copyediting
- Copyedit comments
- Typesetting
- Archival Hyperlinks
- Copyright
- DOI
- Gallery image
- Checklist comment
- Handover comment
- Closing comment
- Opening comment Phase 0
- Phase change comment 1 to 2
- Phase change comment 2 to 3
- Phase change comment 3 to 4
- Opening comment Phase 4
- Phase change comment 4 to 5
- Phase change comment 5 to 6
- Phase change comment 6 to 7
- Tracking lesson phase changes
- Organisational Structure
- Trustee Responsibilities
- Trustee and Staff Roles
- Services to Publications
- Funding
Training
- Onboarding-Process-for-New-Editors
- Leading-a-Shadowing-process
- Board-of-Director---Continuing-Development
The Ombudsperson Role
Technical Guidance
- Making Technical Contributions
- Creating Blog Posts
- Service Integrations
- Brand Guidelines
- French Translation Documentation
- Technical Tutorial on Translation Links
- Technical Tutorial on Setting Up a New Language
- Technical Tutorial on Search
- Twitter Bot
- Achieving-Accessibility-Alt-text-Colour-Contrast
- Achieving-Accessibility:-Training-Options
Editorial Guidance
- Achieving Sustainability: Copyediting, Typesetting, Archival Links, Copyright Agreements
- Achieving Sustainability: Lesson Maintenance Workflow
- Achieving Sustainability-Agreed-terminology-PH-em-português
- Training and Support for Editorial Work
- The-Programming-Historian-Digital-Object-Identifier-Policy-(April-2020)
- How to Request a New DOI
- Service-Agreement-Publisher-and-Publications
- ProgHist-services-to-Publications
- Technical Tutorial on Setting Up a New Language
- Editorial Recruitment
Social Guidance
Finances
- Project Costs
- Spending-Requests-and-Reimbursement
- Funding Opportunities
- Invoice Template
- Donations and Fundraising Policies
Human Resources
- Privileges-and-Responsibilities-of-Membership
- Admin-when-team-members-step-down
- Team-Leader-Selection-Process
- Managing-Editor-Handover
- Checklist-for-Sabbaticals
- New Publications Policy
- Parental-Leave-Policy
Project Management
Project Structure
Board of Trustees