squidfunk / mkdocs-material

Documentation that simply works
https://squidfunk.github.io/mkdocs-material/
MIT License
20.67k stars 3.52k forks source link

New translation: farsi (persian) #689

Closed dev-masih closed 6 years ago

dev-masih commented 6 years ago
{% macro t(key) %}{{ {
  "language": "fa",
  "clipboard.copy": "کپی کردن",
  "clipboard.copied": "کپی شد",
  "edit.link.title": "این صفحه را ویرایش کنید",
  "footer.previous": "قبلی",
  "footer.next": "بعدی",
  "meta.comments": "نظرات",
  "meta.source": "منبع",
  "search.language": "fa",
  "search.placeholder": "جستجو",
  "search.result.placeholder": "برای شروع جستجو تایپ کنید",
  "search.result.none": "سندی یافت نشد",
  "search.result.one": "1 سند یافت شد",
  "search.result.other": "# سند یافت شد",
  "search.tokenizer": "[\s\-]+",
  "skip.link.title": "پرش به محتویات",
  "source.link.title": "رفتن به مخزن",
  "toc.title": "فهرست موضوعات"
}[key] }}{% endmacro %}
dev-masih commented 6 years ago

note that farsi is a rtl language and github input text dosen't have directional texting so the number for "search.result.one" and "search.result.other" must be in the right of sentence not on the left and, what is the context for "meta.source"? is that for source code or for source like a reference to something?

squidfunk commented 6 years ago

Material just added RTL Support, so this is perfect :-) thanks! Will merge asap.

dev-masih commented 6 years ago

you can count on my help for translation to Persian (farsi)

squidfunk commented 6 years ago

Great! Did you try the RTL version? https://squidfunk.github.io/mkdocs-material/getting-started/#text-direction

Does it work for you? I just introduced it but Persian is the first RTL language.

squidfunk commented 6 years ago

meta.source is the headline for linked source files. You can see it here, at the bottom of the page: https://squidfunk.github.io/mkdocs-material/extensions/metadata/

dev-masih commented 6 years ago

yes i'm beginning to build my API documentation in MkDocs and use material as it's theme so I'm going to use it and experiment with it from now on, if i have any suggestion or problem i'll let you know.

about source meta: "منبع" is the right translation for it

squidfunk commented 6 years ago

Included Persian translations and released as part of 2.6.0. Also did some refactoring on how languages and search are handled in general. There is no stemmer for Persian, but I included the possibility to disable trimmer and stop word filter and Persian search even works! The best thing: the only thing you have to do is:

theme:
  language: fa
dev-masih commented 6 years ago

thanks for your effort I'll try this asap