Templates management

Gianluca Rigoletti gianluca.rigoletti at gmail.com
Sun Feb 7 19:12:40 UTC 2016


Hi everyone,

I want to discuss a little bit about how to manage templates.

*The feature:*
We want to find a way to automatically have a consistent way of adding
templates in our wtl subdomain. This means that we would have a git repo in
which all templates are stored. When we want to modify a template, we just
push the new template on the repo. A script/bot will import them in the wtl
domain.

*The problem:*
As we have multiple subdomains (let's say it/en) templates could have the
same name but behave differently. For example, a template with a standard
alert would be in two different languages. Furthermore, it could happens
that templates that have the same function (for example the 'add_course'
template) will be the same piece of code but with different messages and
different names, leading to a messy way to assign name to the template. We
have 'add_course' in en.wtl and 'AggiungereUnCorso' in it.wtl. They don't
even look familiar but their function is the same.

*Possible Solutions:*

   - Proposed by ruphy, is to use templates just for html/css layouts.
   Speaking about the template AddCourse, we would have to write in every page
   of every department the message "Want to add a new course? ..."
   - We can have different name for the templates that have the same
   function but contain different languages. This is quite similar to what we
   are doing now. We would have 'AddCourse' and 'AggiungiCorso'. If this will
   be the solution, a naming convention should be applied
   - Find a way to get the localization and use magic function provided by
   mediawiki. Mediawiki offer some basic if/else statement to generate
   wikicode and has {{CONTENTLANGUAGE}} magic words to determine which
   language is used in the subdomain. This could work. This way writing
   templates will become a little more difficult.


I let Luca or Davide or who wants to speak about the possible procedure to
follow for the script or the bot.
Please, tell me what you think

-- 
Gianluca
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/wikitolearn-tech/attachments/20160207/87f70249/attachment.html>


More information about the WikiToLearn-Tech mailing list