philwareham / textpattern-hive-admin-theme

The default Hive admin theme that ships as standard with Textpattern CMS.
https://design-patterns.textpattern.com/docs/
GNU General Public License v2.0
18 stars 8 forks source link

Localization and textpacks #4

Closed gocom closed 12 years ago

gocom commented 12 years ago

The theme includes few hard-coded sentences. Woudln't it be appropriate to use language strings for those? That's very easy to do even. It's just about adding .textpack file(s) to the repository which then users can easily install from the language pane.

With this instances like <a href="#">&#8593; Back to top</a> in hive.php would become <a href="#">'.gTxt('hive_back_to_top').'</a>.

Textpacks are pretty cool I must say. If you are unsure what they are, take a look familiar repository you are following, rah_backup. I've divided each language to it's own file. For the current content Hive theme contains, a finely crafted textpack would look something like;

#@admin
#@language en-gb
hive_back_to_top => ↑ Back to top
hive_go_to_txp_com => Go to the Textpattern website

Prefixed as themes are also subject to guidelines, namespaces and collisions.

philwareham commented 12 years ago

Hi Jukka,

Thanks for the notes.

I've made a request to have these two bits of text included in the core language strings since I think they would be universally useful. Depending on the reply then I'll either use the core text file or create a Textpack as you suggest.

philwareham commented 12 years ago

Fixed by commit: https://github.com/philwareham/txp-hive-admin-theme/commit/886933efab3501ff99ce0fe304ef9225202cf949