🌐 Theme translations!

Remember when I asked Anyone interested in translating an official theme?

I’ve got a better idea! How about if we do 18 at once!?

:tada: Rolling out over the next week or two are fully translation-wrapped official themes (done by yours truly), and tooling for maintaining a set of common strings that ALL themes can pull from. If you speak a language other than English fluently, you’re invited to participate!

We are ready to translate!! :woman_dancing: :woman_dancing:

All translation efforts for official themes can go into @TryGhost/Themes/theme-translations, and then a build step for all themes will provide those translated strings. Yes, for Source and Casper, too. Translating an already wrapped string — which is all most translation contributors will want to do — will happen in Themes/theme-translations. Since strings live in one place, a set of string translations will make all the official themes available in that language.

Shoutout to @vikaspotluri123 for the super useful gt3 tool (which I built on top of for tracking and combining strings), to @jannis for reviewing the string wrapping PR (a beast), and especially to @9larsons from the Ghost team for being a thought partner and for ongoing work to get all the build, deployment, and shipping bits sorted out.

Also a big shout-out to @Nino , who has been maintaining a fork of Source that includes translations. I hope someone using that project will contribute those existing translations over to the official version. (Note that there are some locale code differences in that fork for zh-*. Please match locales already in Ghost/ghost/i18n/locales at main · TryGhost/Ghost · GitHub if you decide to move those strings. Whether we are using the right set of locale codes is a conversation for another day.)

If you’d like to contribute to this community effort, Themes/packages/theme-translations at main · TryGhost/Themes · GitHub has a pretty good README.

If you’re not sure what a README is or haven’t used Github before, start instead with Help translate Ghost (beta), which has has an excellent video tutorial on how to translate Portal using GitHub (no downloads/installs required). The big differences from the video are:

  • You should be working in TryGhost/Themes, not TryGhost/Ghost.
  • You’ll find the files in packages/theme-translations/locales
  • There aren’t language folders - you’ll find and copy en.json to make a file for your language (i.e. de.json. pt-BR.json), and edit that copy.

That’s pretty much it! If you have questions, pleas post below! If you’d like to coordinate work between translators or request that another person look at your work, that’s good to! Bring on the posts!

Thanks in advance for your help!

Cathy

p.s. Expectation management: Translations will not be live tomorrow. We’re still working on build and roll-out, but I thought it’d be more fun to get some translations done so that we can roll out with actually functional translations, instead of everything being the English fallback!

6 Likes

Oh snap! @bastien completed the French translation before I got to it. I dropped a couple of suggestions on the PR, but I’m guessing my suggestions would just be the difference between “France French” and “Québec French”. That said, its a solid translation.

1 Like

If you want to have a fr-CA locale, we can, but you’d want to also update (or at least duplicate) the current fr for all packages over in @tryghost/ghost, or else setting your locale to fr-CA would mean having the rest of the boilerplate in English! :) We do already have pt and pt-BR, so there’s certainly precedent, if the consensus among the Francophones is that they’re different enough that the community wants to maintain two separate versions.

(Caution: Although the theme strings will probably be pretty static, the apps and Ghost core tend to gain strings pretty regularly, so I wouldn’t add an fr-CA locale unless I planned to maintain it, which means checking for and translating new strings. fr-FR is probably very much preferable to en, which is the fallback for any untranslated content.

Thanks @bastien and @muratcorlu for your contributions! I’ll get those merged in the next couple days. Although I really like the way all the translator work happens in one place, right now the flow to get the strings live on the marketplace after I merge is about 20 steps long, so I’m planning to do all the translation merging about 1x a week. (At least until someone builds a better workflow for this. )

2 Likes

I don’t think we need a fr-CA to start with. I just wanted to point out that there is enough of a difference that you might notice two francophone have very different interpretation of the same concept.

We should probably wait until we have a conformable flow. That said, once we think we’re ready, I’m happy to volunteer for fr-CA.

It’s the same work to do a theme release for one language as 20, so if you’d like to do fr-CA for themes and the rest of ghost, feel free! :slight_smile:

Excellent! Is there a resource for customs theme maintainers who want to include support for this?

1 Like

Yep. You can add theme-translations as a dependency. See the readme, and lmk if it doesn’t yet do what you need.

1 Like