Skip to content

necsi/ecv-translation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Translation status

ecv-translation

Translation of endcoronavirus.org website

How to translate

  • Go to Weblate project
  • Register there and start translating
  • Make sure not to add / remove any whitespaces around translated strings
  • Weblate administrators: commit changes to GitHub using Manage -> Commit
  • Merge pull request created by Weblate to main branch
  • Translations on endcoronavirus.org will be automatically updated

How to add new language

  • Create a new country code directory with a dict.json file containig translation from English to chosen language

How it works

  • Repository has GitHub pages enabled
  • There is a custom script injected in the squarespace settings (header section), which is using squarelate to translate website:
<script src="https://unpkg.com/@kbobrowski/squarelate@v1.1.2/dist/squarelate.min.js"></script>
<script>
var squarelate = Squarelate.defaultBuilder("https://necsi.github.io/ecv-translation", 'en');
squarelate.init();
</script>
  • Languages are added in squarespace Pages, as links which point to e.g. ?lang=pl, where pl is a country code. Note that after saving link settings and opening link settings again there will be nothing in the link field, but this seems like a squarespace bug.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published