Templates management

Cristian Baldi bld.cris.96 at gmail.com
Sun Feb 7 19:31:14 UTC 2016


Hey

I really like the second and third solution.

I don't like the first one because of the amount of work that would need to
be done if we decide to change a string associated with the template. Just
think if we decide that we want to change 'course' with another equivalent
name: we would have to edit every single page.

If we mange to get localization variables working third solution would be
the best because with the second we still have to do double work.

I am looking forward to these additions, I like the templating a lot.

Keep up the good work

Cristian

On Sun, Feb 7, 2016, 20:12 Gianluca Rigoletti <gianluca.rigoletti at gmail.com>
wrote:

> 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
> _______________________________________________
> WikiToLearn-Tech mailing list
> WikiToLearn-Tech at kde.org
> https://mail.kde.org/mailman/listinfo/wikitolearn-tech
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/wikitolearn-tech/attachments/20160207/e4cdf8af/attachment.html>


More information about the WikiToLearn-Tech mailing list