Skip to content
This repository has been archived by the owner on Jul 19, 2022. It is now read-only.

State of CSS 2020: translating the survey in your language #2

Closed
SachaG opened this issue Sep 29, 2020 · 33 comments
Closed

State of CSS 2020: translating the survey in your language #2

SachaG opened this issue Sep 29, 2020 · 33 comments

Comments

@SachaG
Copy link
Member

SachaG commented Sep 29, 2020

IMPORTANT: the translations files have moved to another repo

In previous years we've tried to make the results of each survey available in multiple languages, but this year we want to go one step further and translate the survey questions too in order to reach non-english speakers as well.

Getting Started

The YAML files to translate live in the StateOfJS-API repo, which contains our API:

IMPORTANT: check that there aren't any existing PRs for the language you want to translate first!

You can copy the model files to use as starting point:

Previous Translations

You may also want to take a look at previous year's translations if that helps:

Getting Credit

Every translator will be credited on any site that makes use of the translations, starting with the survey-taking app. You can add your name here if it's not already there.

Translation API

You can get extra data such as the completion percentage for a locale or the untranslated strings via our API, available at:

Here is a sample query:

query GetLocaleData {
  locale(localeId: "ru-RU") {
    completion
    totalCount
    translatedCount
    translators
    untranslatedKeys
  }
}
@SachaG
Copy link
Member Author

SachaG commented Oct 2, 2020

But I already translated this last year!

A note to the many awesome people who have helped us translate the survey in the past: one thing we are trying to do this year is prevent the need for re-translating the same strings every year.

For that reason we'll try to reuse the strings in this repo as much as possible for the results site (e.g. https://2019.stateofjs.com/, etc.) as well. Hopefully we'll then be able to have a much smaller, separate translation project that only targets the character strings specific to the results site.

@SachaG
Copy link
Member Author

SachaG commented Oct 8, 2020

I don't speak language XYZ but still want to help!

Even if you don't speak language XYZ but would still like to help, here's what you can do:

  1. Create new xyz-XYZ.yml files for the locale if it doesn't already exist inside this repo's /i18n directory (by using the model.yml file as model).
  2. Look at the existing translation files for State of JS and State of CSS.
  3. For every string in the xyz-XYZ.yml files in this repo, try to find matching translations in the translation files for previous years. Note that the keys might sometimes be a little different.
  4. If you did find a string, remove the # todo comment.

@SachaG
Copy link
Member Author

SachaG commented Oct 8, 2020

I want to test my translation locally

If you want to see your translations in context inside the survey app, you will need to run the SurveyVulcan repo, which uses the Vulcan.js framework.

The installation might be a little more involved since it might require the two-repo install, but if you want to do it and run into any issues I suggest pinging me on the Vulcan.js Slack.

@polettoweb
Copy link

I might be able to help with Italian this year as well. I suppose there is a time limit to finish it. A bit busy at this moment, but I can find time soon

@SachaG
Copy link
Member Author

SachaG commented Oct 8, 2020

@polettoweb great! We'd like to launch the survey early next week which is a bit short on time, but we can always add more translations as we go.

@polettoweb
Copy link

Ok, I'll do my best to squeeze it in :-)

@polettoweb
Copy link

You might consider registering https://github.com/StateOfJS/StateOfJS-Vulcan to https://hacktoberfest.digitalocean.com/ it might attract more quick help :-)

@SachaG
Copy link
Member Author

SachaG commented Oct 8, 2020

Or more spam… I think I'll avoid it for this year!

@polettoweb
Copy link

Fair enough

@SachaG
Copy link
Member Author

SachaG commented Oct 9, 2020

I added a few new features based on the feedback we received, here's the commit: Devographics/StateOfJS-Vulcan@ad78403

@SachaG
Copy link
Member Author

SachaG commented Oct 11, 2020

whoops, I realized I forgot to add unit/selector names to the translation files: Devographics/StateOfJS-Vulcan@b1ecb06#diff-c97a3dab92e66d7d2b4f45531b0e6d2a

@Omhet
Copy link

Omhet commented Oct 11, 2020

@SachaG Hi, I think I could help with russian 😊

@SachaG
Copy link
Member Author

SachaG commented Oct 11, 2020

@Omhet that'd be great! Russia has a huge presence on the web so it'd be nice to reach that audience as well :)

@zainab-oraby
Copy link

I understand from the thread that time is running short as the survey is coming out early next week, but I would like to help with Arabic and will do my best to get something up asap.

@SachaG
Copy link
Member Author

SachaG commented Oct 11, 2020

@zmmorabya thanks! RTL languages might require some extra styling so if you have time to contribute the translations I'll look into adding a special class to the body or something when RTL languages are enabled.

@zainab-oraby
Copy link

That sounds very good! I will carry on and put the translation up for review as soon as I can. And may be later I can help with the RTL styling, I'd be glad to do so.

@Omhet
Copy link

Omhet commented Oct 11, 2020

@SachaG Made a PR for russian translation Devographics/StateOfJS-Vulcan#38

@SachaG
Copy link
Member Author

SachaG commented Oct 13, 2020

Note that the translations files have moved to another repo: https://github.com/StateOfJS/state-of-js-graphql-results-api/tree/master/src/i18n

If you have PRs in progress on the old repo go ahead with them and I'll figure out how to merge everything properly, but if you're starting fresh then use the new repo!

@SachaG
Copy link
Member Author

SachaG commented Oct 14, 2020

First of all, thanks again for everybody's help with this! It's been amazing to see all the translations PRs come in! A quick update about the project:

1. New Repo

As written above, the translation files have been moved to a new repo:

https://github.com/StateOfJS/state-of-js-graphql-results-api/tree/master/src/i18n

The reason behind the move is that the translations are now pulled through our central GraphQL API, which will make it easier to reuse them for our results site as well (in addition to the survey-taking app).

2. New Strings

I've added a few more new strings to translate. If you can search for # TODO throughout the translation files for your languages you should find them!

3. Launch Date

We will try and launch the survey next Monday (October 19th). Hopefully we can get a few more languages finalized before then!

4. Translation Credit

Every translator will be credited on any site that makes use of the translations, starting with the survey-taking app. You can add your name here if it's not already there.

@SachaG
Copy link
Member Author

SachaG commented Oct 20, 2020

The survey is now live! Thanks for your hard work!

https://stateofcss.com/

(Of course you can still keep translating even if the survey is live… and we'll need your help again for the results very soon!)

@ervinismu
Copy link

Hi @SachaG, can I translate to Indonesian? 😊

@SachaG
Copy link
Member Author

SachaG commented Oct 20, 2020

@ervinismu yes of course! that'd be great!

@MarianaPicolo
Copy link

I'd love to translate for brazilian portuguese 😀

@SachaG
Copy link
Member Author

SachaG commented Oct 21, 2020

@MarianaPicolo how different would a Brazilian Portuguese version be compared to the current Portuguese version? If the current version is understandable by Brazilian Portuguese speakers we'd probably prefer avoid having multiple versions of the same language, just to make maintenance easier over the long term. Is there a way to make a "neutral" version that avoids terms that are specific to either language?

@MarianaPicolo
Copy link

@MarianaPicolo how different would a Brazilian Portuguese version be compared to the current Portuguese version? If the current version is understandable by Brazilian Portuguese speakers we'd probably prefer avoid having multiple versions of the same language, just to make maintenance easier over the long term. Is there a way to make a "neutral" version that avoids terms that are specific to either language?

There are some words and expressions that differ from the Portuguese version.

@SachaG
Copy link
Member Author

SachaG commented Oct 21, 2020

I think we're going to apply the same guidelines as Wikipedia, which as far as I can tell only has one general Portuguese version. So I would suggest contributing to the existing Portuguese version instead, sorry…

@adamkudrna
Copy link

@SachaG I'd like to translate into Czech, or am I late to the party?

@SachaG
Copy link
Member Author

SachaG commented Oct 22, 2020

@adamkudrna sure that'd be great!

@adamkudrna
Copy link

Here we go: Devographics/state-of-js-graphql-results-api#46 🇨🇿

@SachaG
Copy link
Member Author

SachaG commented Oct 23, 2020

@ymcheung you're right, we should remove those from state_of_js.yml and probably move them to common.yml if they exist in both surveys. I won't change it for now to avoid merge conflicts but at some point we'll take a moment to clean up the keys.

@SachaG
Copy link
Member Author

SachaG commented Oct 23, 2020

Since we're trying to centralize translations and avoid duplicate work between the CSS and JS surveys, I'll also move all discussion about this topic to a central thread:

Devographics/state-of-js-graphql-results-api#50

@SachaG SachaG closed this as completed Oct 23, 2020
@SachaG
Copy link
Member Author

SachaG commented Nov 18, 2020

We have added a few more strings to translate: Devographics/state-of-js-graphql-results-api#50 (comment)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants