slsa-framework / slsa

Supply-chain Levels for Software Artifacts
https://slsa.dev
Other
1.56k stars 225 forks source link

Translate SLSA to japanese #195

Open kannkyo opened 3 years ago

kannkyo commented 3 years ago

I want to translate SLSA documents to japanese . How can I do it?

My ideas are:

  1. fork this repository and translate each file
  2. pull requests to this repo with xxxx-ja.md (translated xxxx.md)
kimsterv commented 3 years ago

What a great idea! @david-a-wheeler any pro-tips here? I think you've had experience translating CII Badges.

david-a-wheeler commented 3 years ago

The CII Best Practices Badge is a web application, so it's a different circumstance than a static site. Not sure they're pro tips, but here's food for thought that I hope helps.

Instead of having FILENAME-LOCALE.md, I suggest thinking about using LOCALE/FILENAME.md instead. That is, a directory for each locale. You could interpret "no-locale" as English (en). Rationale:

  1. A lot of websites show locale-specific files in the form DOMAIN/LOCALE/FILENAME, including the CII Best Practices site itself (e.g., https://bestpractices.coreinfrastructure.org/fr or https://bestpractices.coreinfrastructure.org/ja), so I think that's a more common convention.
  2. If your "normal" filename ends in a suffix + extension where the suffix looks like a locale, that would be a problem - you'd have a name collision. I haven't had any problem ensuring whole filenames look different from locales in cases where that's important, especially if I'm also matching on an extension. But I wouldn't be so certain that the last part of a file before the extension never matched a locale.
  3. If you get a lot of languages and have a lot of files, the directory clutters up with all the translations, making it hard to see what's what. Separating the locales makes it clearer what is source & what is not. Having lots of locale directories isn't a big deal, it's really obvious what they are :-).

That said, FILENAME-LOCALE.md will take away no birthdays :-). You can always start with that, and then move it later, if you'd like to.

Remarkably I didn't find a lot of guidance for internationalizing static sites. Here's one: https://www.smashingmagazine.com/2020/11/internationalization-localization-static-sites/. Take it with pounds of salt as usual :-).

Stuff you probably already know:

A minor annoyance is dash vs. underscore when specifying region-specific locales. For the separator character, ISO/IEC 15897 uses underscore, while RFC 5646 https://www.rfc-editor.org/rfc/rfc5646.txt uses dashes. For example, both agree that English is "en". However, in RFC 5646 format Simplified Chinese is typically marked as "zh-CN", while traditional Chinese is typically marked as "zh-TW". (I am just discussing technical markings here.) In contrast, with ISO/IEC you would use "" instead of "-". We used the RFC (dash) version because the Ruby libraries preferred that form; lots of things "just worked" when we did that. However, the ISO format is justifiable; I think Java accepts both but prefers ISO ("") form. For now I guess the rule is be consistent.

I hope that helps...

kannkyo commented 3 years ago

@kimsterv @david-a-wheeler

Thank you for your advice.

I research other static sites example. I guess that semver.org is good example for me.

semver.org

I try to make translation demo site for SLSA.

I change jekyll config and template html files.

Change summary is:

kimsterv commented 3 years ago

This is awesome! I wish I knew Japanese. I'm also adding in @devmoran as I believe they're planning on some site changes. Dev may also have some input on translating.

ken5scal commented 3 years ago

@kannkyo I think I can help reviewing (I'm Japanese, too)

kannkyo commented 3 years ago

@ken5scal

Thank you for your suggestion. I think I will ask you to review it in a week or two.

You can check the progress of the translation at

And you can see the translation list of important words at the following markdown.

trishankatdatadog commented 3 years ago

Don't get me wrong: I think it's fantastic to translate SLSA to Japanese, but perhaps the effort is best spent when we reach 1.0?

kannkyo commented 3 years ago

@trishankatdatadog

Thank you for your advice.

As you said, translating SLSA now would be a double effort....

But on the other hand, I would like to spread SLSA (and supply chain security) to Japan through this translation, because SLSA is hardly known even in the Japanese security industry.... :cry: So, I'd like to translate current version SLSA ( v0.2 ?).

trishankatdatadog commented 3 years ago

But on the other hand, I would like to spread SLSA (and supply chain security) to Japan through this translation, because SLSA is hardly known even in the Japanese security industry.... 😢

Makes sense, and thanks for your help!

devmoran commented 3 years ago

@kannkyo This is really impressive! As @kimsterv mentioned, over the next month we're planning to update (and add to) the design and content in some sections of the current site.

As far as your translation, I don't think anything we're planning will break what you've done so far, but I'd like to give you access to our work-in-progress so that you can decide how/when to incorporate these new changes. We'll have something to show you in a few weeks time, I'll post it here!

06kellyjac commented 3 years ago

Translating it now means that people more comfortable with Japanese can get involved molding the direction of SLSA ahead of 1.0, also it means we can test out the translation setup, what the workflow is like for translating, how the website operates, adding and trying a language selector somewhere on the page, etc

kannkyo commented 3 years ago

@ken5scal

I finish my work ! Can you review #223 as a native speaker ? I translate main branch HEAD ( 1e3e23b6790cd736cff94e1ed10d1a4af0a064f9 ) version without threats.md. threats.md was just added very recently (and too many content :cry: ), so it was excluded. I'll translate it, later...

@devmoran

Can you review my pull request #223 as design and contents ? I hope that there are no conflicts between our achievements.

devmoran commented 2 years ago

Hi @kannkyo, just wanted to let you know that I will review your language switching in #223 before the end of this week, and I will integrate your approach into what we are doing with the EN design and content updates. I think the language switching will work great.