Skip to content

Translations review #34

@kernc

Description

@kernc

I don't think this kind of enumerated format for pages text is very extensible.

Suppose you, the upstream, add an English paragraph somewhere in between. You have to fix all the following labels, and any language extensions would have to add the new label as well. Additionally, if a downstream Chinese wants to add a paragraph or section for their users, how do they do it? What you're missing is the ability to transparently insert a piece of text only for some languages and not for others, e.g. an additional explanation for the Chinese, different disclaimer for the Africans, thorough insight for the Finns, ...

IMHO, it would be better if page labels were structured as: even better, see below.

...
text_gettingStarted: [
    'Preveden naslov 1',
    ['preveden odstavek 1', 'preveden odstavek 2', ...],
    'naslov 2',
    ...
],
...

This would have the potential to make different languages out of sync, but these are support information pages, and allowing for conditional presentation based on visitors' language is not something unexpected.

In general, the i18n system doesn't seem very modular and nice. The fact that keys are English labels repeated in full repulses me.

It's kind of late to provide that kind of feedback, but I'd like it better if only the bare-minimum requred translations were in the global language file. The rest being in their per-assignment modules. For example, some-assignment.html, almost self-contained:

<div class='i18n text'>
    <p data-lang="en">This is english translation.</p>
    <p data-lang="sl">To je slovenski prevod.</p>
</div>

This is, among other examples, how FreeDesktop does it (/usr/share/applications/*.desktop files).

Metadata

Metadata

Assignees

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions