Alfanous-team / alfanous

Alfanous is an Arabic search engine API provides the simple and advanced search in Quran , more features and many interfaces...
http://www.alfanous.org/
GNU Affero General Public License v3.0
262 stars 89 forks source link

Move the logic of meta description to a template tag. #356

Closed mdebbar closed 10 years ago

mdebbar commented 10 years ago

NB: It's a very bad idea to split strings for translation. For example instead of:

person_name + _(" is eating ") + something

we should do:

_("%(person_name)s is eating %(something)s") %
{
  'person_name': person_name,
  'something': something
}

This gives us some advantages:

  1. The translator can see the full sentence so it's easier for him to translate it correctly.
  2. The 2nd approach doesn't enforce any order because we are not concatenating strings. This is useful for some languages that have different sentence structure.
mdebbar commented 10 years ago

To generate the .po files, I used the command:

django-admin.py makemessages --all
assem-ch commented 10 years ago

to update launchpad translation pot file when you want to make a release use: make local_pot_django

https://translations.launchpad.net/alfanous