Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translate content to Arabic #540

Closed
SilentJMA opened this issue Nov 25, 2019 · 7 comments
Closed

Translate content to Arabic #540

SilentJMA opened this issue Nov 25, 2019 · 7 comments
Labels
good first issue Good for newcomers translation world wide web
Milestone

Comments

@SilentJMA
Copy link
Contributor

SilentJMA commented Nov 25, 2019

These are the core templates - without which we cannot release any translated chapters. They are in the language specific templates directory:

  • base.html -
  • base_chapter.html-
  • error.html -

2024

  • base.html -
  • base.html - foreword
  • contributors.html -
  • index.html -
  • table_of_contents.html -

2022

  • base.html -
  • contributors.html -
  • index.html -
  • table_of_contents.html -

2021

  • base.html -
  • base.html - foreword
  • contributors.html -
  • index.html -
  • table_of_contents.html -

2020

  • base.html -
  • contributors.html -
  • index.html -
  • table_of_contents.html -

2019

  • base.html -
  • contributors.html -
  • index.html -
  • table_of_contents.html -

These are the chapters to be translated. They exist in the content directory:

2024

  • css -
  • javascript -
  • markup -
  • structured-data -
  • fonts -
  • media -
  • webassembly -
  • third-parties -
  • seo -
  • accessibility -
  • performance -
  • privacy -
  • security -
  • cms -
  • ecommerce -
  • jamstack -
  • sustainability -
  • page-weight -
  • cdn -
  • http -
  • cookies -

2022

  • css -
  • javascript -
  • markup -
  • structured-data -
  • fonts -
  • media -
  • webassembly -
  • third-parties -
  • interoperability -
  • seo -
  • accessibility -
  • performance -
  • privacy -
  • security -
  • mobile-web -
  • capabilities -
  • pwa -
  • cms -
  • jamstack -
  • sustainability -
  • page-weight -
  • cdn -
  • http -

2021

  • css -
  • javascript -
  • markup -
  • structured-data -
  • media -
  • webassembly -
  • third-parties -
  • seo -
  • accessibility -
  • performance -
  • privacy -
  • security -
  • mobile-web -
  • capabilities -
  • pwa -
  • cms -
  • ecommerce -
  • jamstack -
  • page-weight -
  • compression -
  • caching -
  • cdn -
  • resource-hints -
  • http -

2020

  • css -
  • javascript -
  • seo -
  • markup -
  • accessibility -
  • cms -
  • performance -
  • security -
  • jamstack -
  • fonts -
  • mobile-web -
  • http2 -
  • capabilities -
  • third-parties -
  • page-weight -
  • caching -
  • resource-hints -
  • privacy -
  • compression -
  • ecommerce -
  • media -

2019

  • javascript -
  • css -
  • seo -
  • performance -
  • http2 -
  • markup -
  • third-parties -
  • accessibility -
  • pwa -
  • cms -
  • security -
  • media -
  • mobile-web -
  • cdn -
  • ecommerce -
  • page-weight -
  • caching -
  • compression -
  • resource-hints -

Additionally the following pages need translated too in the language specific templates directory:

  • 2021/methodology.html -
  • accessibility_statement.html -
  • base_ebook.html-
  • methodology.html 2019 -
  • methodology.html 2020 -

There is no need to translate the chapters HTML pages are they are generated off the markdown combined with the above templates.

Please include "Makes progress on #540 " in all pull requests so a link is created from the PR to this issue.


Common notes for writing consistency are here: https://github.com/HTTPArchive/almanac.httparchive.org/wiki/Translators'-Guide. Feel free to edit that and/or add Arabic-specific extras by editing this comment.

Arabic specific extra advice:

@tunetheweb
Copy link
Member

tunetheweb commented Nov 25, 2019

Greats stuff @SilentJMA - I've updated your first comment showing what needs to be done. Feel free to stick your name against an item, clone the repo, and submit pull requests (PRs) with your translations.

Note a lot of the visualisation graphics are due to change in #511 so might want to hold off for that for some of the chapters, but the JavaScript, Accessibility and HTTP/2 chapters are good to go now.

Unfortunately my Arabic is non-existent so would be good to have someone else fluent in the language to review your PRs. I'm happy to give PRs a once over for other technical issues though.

@tunetheweb tunetheweb assigned tunetheweb and SilentJMA and unassigned tunetheweb Nov 25, 2019
@tunetheweb tunetheweb added the translation world wide web label Nov 25, 2019
@rviscomi rviscomi added this to the Après Ski milestone Nov 25, 2019
@SilentJMA
Copy link
Contributor Author

Greats stuff @SilentJMA - I've updated your first comment showing what needs to be done. Feel free to stick your name against an item, clone the repo, and submit pull requests (PRs) with your translations.

Note a lot of the visualisation graphics are due to change in #511 so might want to hold off for that for some of the chapters, but the JavaScript, Accessibility and HTTP/2 chapters are good to go now.

Unfortunately my Arabic is non-existent so would be good to have someone else fluent in the language to review your PRs. I'm happy to give PRs a once over for other technical issues though.

in #540 we will need a change from Left to Right is it possible because it's different to FR/EN/ES.. which start from left to right

@tunetheweb
Copy link
Member

in #540 we will need a change from Left to Right is it possible because it's different to FR/EN/ES.. which start from left to right

Yes this is possible.

Everything inherits based off of the src/templates/_LANG_/2019/base.html template. This will need to be translated anyway.

This language-specific base.html inherits from the main, language-independent, src/templates/base.html file which has the following at the top of the file:

<!doctype html>
<html lang="{% block lang %}{{ language.lang_attribute }}{% endblock %}">

It is possible to override {% %} blocks, so when creating the src/templates/ar/2019/base.html file as part of your translation process, override the {% block lang %} section of the main src/templates/base.html file to add the dir attribute by adding the following after the {% extends "base.html" %} line:

{%block lang %}{{ language.lang_attribute }}" dir="rtl{% endblock %}

This will make it evaluate to:

<html lang="ar" dir="rtl">

Now this is a bit of a hack to be honest as I'm basically setting the language to ar" dir="rtl and depending on the quotes matching. But it'll do for now and we'll fix it up in a better way later.

@SilentJMA
Copy link
Contributor Author

in #540 we will need a change from Left to Right is it possible because it's different to FR/EN/ES.. which start from left to right

Yes this is possible.

Everything inherits based off of the src/templates/_LANG_/2019/base.html template. This will need to be translated anyway.

This language-specific base.html inherits from the main, language-independent, src/templates/base.html file which has the following at the top of the file:

<!doctype html>
<html lang="{% block lang %}{{ language.lang_attribute }}{% endblock %}">

It is possible to override {% %} blocks, so when creating the src/templates/ar/2019/base.html file as part of your translation process, override the {% block lang %} section of the main src/templates/base.html file to add the dir attribute by adding the following after the {% extends "base.html" %} line:

{%block lang %}{{ language.lang_attribute }}" dir="rtl{% endblock %}

This will make it evaluate to:

<html lang="ar" dir="rtl">

Now this is a bit of a hack to be honest as I'm basically setting the language to ar" dir="rtl and depending on the quotes matching. But it'll do for now and we'll fix it up in a better way later.

Maybe i can fix it if i try but i don't know i will test it later and see .........

@tunetheweb
Copy link
Member

Maybe i can fix it if i try but i don't know i will test it later and see .........

Submitted #551 to add this ability. will leave you to do the hard part (the translations!). 😀

@tunetheweb tunetheweb added the good first issue Good for newcomers label Dec 5, 2019
@tunetheweb
Copy link
Member

Interesting article I came across about handling rtl text: https://www.rtlstyling.com/posts/rtl-styling/

Reminded me of this issue so I thought I’d post here (in part to remind myself!) in case we need to do any more with the styling after translations are done.

@tunetheweb
Copy link
Member

There's been no progress on this in last few months so am going to close this. We can reopen if we get translators.

@SilentJMA let us know if you plan on actioning this and want to re-open it?

@tunetheweb tunetheweb changed the title Translate content to Arabic Translate 2019 content to Arabic Jun 27, 2020
@tunetheweb tunetheweb changed the title Translate 2019 content to Arabic Translate content to Arabic Nov 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers translation world wide web
Projects
None yet
Development

No branches or pull requests

3 participants