thephpleague / thephpleague.github.io

The League of Extraordinary Packages website
thephpleague.com
MIT License
45 stars 34 forks source link

Improve how translations are done #21

Closed reinink closed 10 years ago

reinink commented 10 years ago

I'm quickly realizing that managing these sites, and the design changes, is going to become a bit of a nightmare. Just consider the Spanish translation (http://es.thephpleague.com/), which has the old design of the site. Bringing it up to speed is going to be a pain.

What if we had a _data\local.yml which housed all the translation info in it. Meaning all the sites would be identical, except this file. When a translation needs to be done, it simply means updating one file as well. Something like this:

name: The League of Extraordinary Packages
intro: The League of Extraordinary Packages is a group of developers who have banded together to build solid, well tested PHP packages using modern coding standards.
features:
    - feature_1: We comply to the standards of the PHP-FIG.
    - feature_2: We adhere to the best-practices put forward by PHP The "Right" Way.
    - feature_3: We distribute code via Packagist and Composer.
packages:
    - title: Our Packages
    - project_name: Name
    - project_description: description
    - project_lead: project Lead
    - project_work_in_progress: a work-in-progress package
quailty:
    - title: Our Definition Of Quality
    - introduction: Ask 100 developers what defines an awesome PHP package and you’ll get a lot of different answers. That also sounds like a really long and boring task, so we’ve come up with a list of rules that we think make a package awesome.
reinink commented 10 years ago

One possible challenge is going to be with links, which may get modified to point to the appropriate language of the site being link to. We could do this:

features:
    - feature_1: 'We comply to the standards of the [PHP-FIG](http://www.php-fig.org/).'
    - feature_2: 'We adhere to the best-practices put forward by [PHP The "Right" Way](http://eilgin.github.io/php-the-right-way/).'
    - feature_3: 'We distribute code via [Packagist](https://packagist.org/) and [Composer](https://getcomposer.org/).'
MunGell commented 10 years ago

@reinink I don't think there is a markdown processor somewhere between YAML document and actual HTML page at the moment.

Should we use HTML notation for the time being?

features:
    - feature_1: 'We comply to the standards of the <a href="http://www.php-fig.org">PHP-FIG</a>.'
    - feature_2: 'We adhere to the best-practices put forward by <a href="http://eilgin.github.io/php-the-right-way/">PHP The "Right" Way</a>.'
    - feature_3: 'We distribute code via <a href="https://packagist.org/">Packagist</a> and <a href="https://getcomposer.org/">Composer</a>.'
reinink commented 10 years ago

@MunGell Exactly what I thought, but then I tried it and it actually worked!

MunGell commented 10 years ago

Awesome! This will be really helpful for translators

reinink commented 10 years ago

@MunGell Correction, I just updated Jekyll to the newest version, and now Markdown doesn't work in data files. Who knew? Your proposed method works just fine though.

reinink commented 10 years ago

Done as of 7e9b3e7f41f613395c15414e7d45843e5f89e8e3.