LocalizationProject
ActivePublic

Details

Description

The KDE project which touches Localization [l10n] (and Internationalization [i18n])

Recent Activity

Yesterday

ognarb updated subscribers of T11723: Translation of jekyll or hugo based websites .
Sun, Oct 13, 7:38 PM · Websites, Localization
cullmann added a comment to T11723: Translation of jekyll or hugo based websites .

:) nice!

Sun, Oct 13, 7:20 PM · Websites, Localization
ognarb added a comment to T11723: Translation of jekyll or hugo based websites .

🎉 it works:

Sun, Oct 13, 7:06 PM · Websites, Localization
ognarb added a comment to T11723: Translation of jekyll or hugo based websites .

Ok, the .htaccess was actually not generated by Hugo but located in the static directory. I pushed to the server let's see if its work. ;)

Sun, Oct 13, 7:02 PM · Websites, Localization
bcooksley added a comment to T11723: Translation of jekyll or hugo based websites .

Is there no way of getting Hugo to append given content to the .htaccess it already generates?

Sun, Oct 13, 6:28 PM · Websites, Localization
ognarb added a comment to T11723: Translation of jekyll or hugo based websites .

Hugo already generate a .htaccess in public, so this configuration need to be added in the apache conf :(

Sun, Oct 13, 6:12 PM · Websites, Localization
bcooksley added a comment to T11723: Translation of jekyll or hugo based websites .

Christoph is correct here, our systems permit the use of .htaccess files, so you should be able to use the Apache Rewrite module without anything being needed on our side
(Note that RewriteBase will probably not be required)

Sun, Oct 13, 6:00 PM · Websites, Localization
cullmann added a comment to T11723: Translation of jekyll or hugo based websites .

kate-editor.org should have the module enabled and you should be able to just add some .htaccess with such rules to the hugo static files dir.

Sun, Oct 13, 3:54 PM · Websites, Localization
ognarb updated subscribers of T11723: Translation of jekyll or hugo based websites .

@cullmann thanks for the hint, I come up with this 404 handler written using mod_rewrite.

Sun, Oct 13, 2:03 PM · Websites, Localization
cullmann added a comment to T11723: Translation of jekyll or hugo based websites .

Hmm, beside that, can one not simply fix that by using a 404 handler that does the redirect? I did that once for the AbsInt page, just rewriting the url to the generic english page if the original url ended up in 404.

Sun, Oct 13, 11:24 AM · Websites, Localization

Sat, Oct 12

cullmann added a comment to T11723: Translation of jekyll or hugo based websites .

Too bad that partially translated stuff doesn't work :/
I only read a bit in the above thread on discourse: is there actually a real bug report that requests support for this?

Sat, Oct 12, 10:01 AM · Websites, Localization
ognarb added a comment to T11723: Translation of jekyll or hugo based websites .

Ok I was able to work around some of the limitations of Hugo. I added a redirection in javascript, the user experience is not very nice since we need to wait at least 5 seconds before being redirected. For example https://kate-editor.org/uk/build-it/

Sat, Oct 12, 12:07 AM · Websites, Localization

Mon, Oct 7

ognarb added a comment to T11723: Translation of jekyll or hugo based websites .

I added a language picker in kate-editor.org and I have bad news, hugo doesn't support partial translated website. Either the entire website is translated or it's not and a lot of dead link are created, because Hugo doesn't provide any fallback to the default language.

Mon, Oct 7, 2:27 PM · Websites, Localization

Fri, Oct 4

ltoscano added a comment to T4803: Consolidate {branches/stable,trunk}/l10n-{kde4,kf5}/scripts into a git repository.

@nalvarez hi! Do you have any news about this task? Can we help?

Fri, Oct 4, 9:43 PM · Localization

Sat, Sep 28

ognarb added a comment to T11723: Translation of jekyll or hugo based websites .

Translations with Hugo and po4a works 🎉 See https://kate-editor.org/about-kate.uk/ or https://kate-editor.org/about-kate.pl/

Sat, Sep 28, 4:06 PM · Websites, Localization

Tue, Sep 24

davidedmundson added a comment to T11721: Splitting of i18n strings.

In overall Plasma, we typically simply use longer lines. It's not been an issue.
A good editor (such as kate) will wrap in a way that shows the indent properly anyway.

Tue, Sep 24, 9:22 AM · Localization, Kirigami, Plasma
romangg added a comment to T11721: Splitting of i18n strings.
In T11721#202182, @pino wrote:

! In T11721#202172, @aacid wrote:
FWIW you can do

    text: i18n("bla \
hola")

and it will work, but note the hola needs to start at column 0, probably your strict code style doesn't allow for that either.

This was suggested: https://phabricator.kde.org/D23783#527600
... and not accepted by the maintainer either because "ugly".

Tue, Sep 24, 8:13 AM · Localization, Kirigami, Plasma
pino added a comment to T11721: Splitting of i18n strings.

! In T11721#201558, @romangg wrote:
If not via newlines could it be possible to make it work by combining strings with +? Like:

i18n("Lorem ipsum dolor sit amet, consectetur adipisici elit, " +
     "sed eiusmod tempor incidunt ut labore et dolore magna aliqua.")

Not sure why this doesn't work at the moment. Is it because of this xgettext tool?

Tue, Sep 24, 4:15 AM · Localization, Kirigami, Plasma

Mon, Sep 23

aacid added a comment to T11721: Splitting of i18n strings.

That makes me think that the problem lies more on the QML side not accepting multi-line strings like:

Mon, Sep 23, 9:37 PM · Localization, Kirigami, Plasma
aacid added a comment to T11721: Splitting of i18n strings.

FWIW you can do

Mon, Sep 23, 9:36 PM · Localization, Kirigami, Plasma
aacid added a comment to T11721: Splitting of i18n strings.
the i18n team manpower is close to zero.
Mon, Sep 23, 9:27 PM · Localization, Kirigami, Plasma

Sun, Sep 22

ognarb added a comment to T11723: Translation of jekyll or hugo based websites .

@ltoscano I added the StaticMessages.sh script. It should now works ;)

Sun, Sep 22, 11:09 AM · Websites, Localization

Sat, Sep 21

ltoscano added a comment to T11723: Translation of jekyll or hugo based websites .

As I mentioned, you need to create a StaticMessages.sh file in your repository, which expose the two twin functions (export_pot_dir/import_pot_dirs if you deal with multiple pot files or export_pot_file/import_pot_files if you have just one), following the example of websites/docs-krita-org, plasma-browser-integration or other projects (kdeconnect-android, for example).
The only thing I can do on the translation side is to enable the extraction for that repository, but you need to write that script.

Sat, Sep 21, 7:49 PM · Websites, Localization
ognarb added a comment to T11723: Translation of jekyll or hugo based websites .

@ltoscano I merged the change in the kate-editor.org repository. The https://kate-editor.org/about-kate/ page should now be translatable. Can the Localization team do the necessary scripty change?

Sat, Sep 21, 4:03 PM · Websites, Localization

Fri, Sep 20

aspotashev added a comment to T11721: Splitting of i18n strings.
i18n("Lorem ipsum dolor sit amet, consectetur adipisici elit, " +
     "sed eiusmod tempor incidunt ut labore et dolore magna aliqua.")
  • even if that is fixed, the two strings would be still considered separate and extracted separately; there is no way to say that they are really the same string (otherwise weird things can happen if a variable is part of a concatenation). The string should really be a unique string.
Fri, Sep 20, 1:01 PM · Localization, Kirigami, Plasma
ltoscano added a comment to T11721: Splitting of i18n strings.

Just to reiterate when I say that I will enforce the rule it means that I will do this while keeping other priorities in check, in particular that "functionality is more important to me". What I don't want to see is commits breaking the rules without giving me notice, prior discussion and a path forward. That's why I reverted the original commit.

Fri, Sep 20, 8:57 AM · Localization, Kirigami, Plasma
ltoscano added a comment to T11721: Splitting of i18n strings.

If not via newlines could it be possible to make it work by combining strings with +? Like:

i18n("Lorem ipsum dolor sit amet, consectetur adipisici elit, " +
     "sed eiusmod tempor incidunt ut labore et dolore magna aliqua.")

Not sure why this doesn't work at the moment. Is it because of this xgettext tool?

Fri, Sep 20, 8:51 AM · Localization, Kirigami, Plasma
romangg added a comment to T11721: Splitting of i18n strings.
In T11721#201554, @mart wrote:

as my personal 2 cents user facing strings are so important that they should exampted by that rule (or even the frameworks coding styles amended"
for QML, it's not easily changeable, and in general having javascriptis always kindof dangerous having newlines that aren't strictly necessary, as the interpreter can always think "let's try to put a ; in there and let's see what happens"
for qml, we should really have separate coding styles, that don't diverge from kdelibs where make sense, but the kdelibs ones really are c++ specific ones

Fri, Sep 20, 8:45 AM · Localization, Kirigami, Plasma
romangg added a comment to T11721: Splitting of i18n strings.

[...]
I find the fact that you want to give a stricter interpretation of a rule like this, which also affects other community members, a bit over the line with the powers of a maintainer. It should be part of a community discussion inside your project at least (Plasma), if not a more general one. I also personally find the fact that this is a "will" without adding a "if possible" a bit too strong; see below.

Fri, Sep 20, 8:39 AM · Localization, Kirigami, Plasma
mart added a comment to T11721: Splitting of i18n strings.

as my personal 2 cents user facing strings are so important that they should exampted by that rule (or even the frameworks coding styles amended"
for QML, it's not easily changeable, and in general having javascriptis always kindof dangerous having newlines that aren't strictly necessary, as the interpreter can always think "let's try to put a ; in there and let's see what happens"
for qml, we should really have separate coding styles, that don't diverge from kdelibs where make sense, but the kdelibs ones really are c++ specific ones

Fri, Sep 20, 8:35 AM · Localization, Kirigami, Plasma
ltoscano added a comment to T11721: Splitting of i18n strings.

This is not off-topic, because the limit you are trying to enforce is not an absolute limit, as stated in the same code that you are quoting. It's not about "code style can just go to shit". If the QML does not allow to have this, well, either fix QML (at this point probably for Qt6), there in no much to do: an important feature like translations cannot be broken, as I pointed out on IRC, with my translator co-coordinator hat on.

As already said I interpret it as an absolute limit and will enforce it this way. Besides you're reiterating what I already said: An important feature like translations cannot be broken? As I said earlier: "functionality is more important to me." Either fix QML? Well, that's what this task is supposed to be about.

Fri, Sep 20, 8:13 AM · Localization, Kirigami, Plasma
romangg added a comment to T11721: Splitting of i18n strings.

This is not off-topic, because the limit you are trying to enforce is not an absolute limit, as stated in the same code that you are quoting. It's not about "code style can just go to shit". If the QML does not allow to have this, well, either fix QML (at this point probably for Qt6), there in no much to do: an important feature like translations cannot be broken, as I pointed out on IRC, with my translator co-coordinator hat on.

Fri, Sep 20, 8:03 AM · Localization, Kirigami, Plasma
ltoscano added a comment to T11721: Splitting of i18n strings.

This is not off-topic, because the limit you are trying to enforce is not an absolute limit, as stated in the same code that you are quoting. It's not about "code style can just go to shit". If the QML does not allow to have this, well, either fix QML (at this point probably for Qt6), there in no much to do: an important feature like translations cannot be broken, as I pointed out on IRC, with my translator co-coordinator hat on.

Fri, Sep 20, 7:36 AM · Localization, Kirigami, Plasma
romangg added a comment to T11721: Splitting of i18n strings.
In T11721#201544, @pino wrote:

[...]
So @romangg: please do not use non-absolute rules as absolute hammer to enforce poor localization, and think more about the users, thanks.

Fri, Sep 20, 7:25 AM · Localization, Kirigami, Plasma
pino added a comment to T11721: Splitting of i18n strings.

BTW, since the "100 characters per line" was brought as single argument, let's actually check what the KDE Frameworks Coding Style actually say.
Quoting bits from https://techbase.kde.org/Policies/Frameworks_Coding_Style (emphases mine):

Fri, Sep 20, 6:02 AM · Localization, Kirigami, Plasma

Thu, Sep 19

cullmann added a comment to T11723: Translation of jekyll or hugo based websites .

If it helps, do all the experiments you want on kate-editor.org.
The web-server will re-pull the git all 5 minutes after some change.

Thu, Sep 19, 7:04 PM · Websites, Localization
ognarb added a comment to T11723: Translation of jekyll or hugo based websites .

Now I see that you mean, I added an import function. python3 translations.py extract directory/with/po/files

Thu, Sep 19, 5:24 PM · Websites, Localization
ltoscano added a comment to T11723: Translation of jekyll or hugo based websites .

No, I think that's the structure required by sphinx. Make sure that import_po_dirs returns the structure that you need.
Please note that the use case of docs-krita-org involves multiple pot files. If you just need one (but again, it depends on the size), this is a simpler case:
https://cgit.kde.org/plasma-browser-integration.git/tree/StaticMessages.sh

Thu, Sep 19, 5:00 PM · Websites, Localization
ognarb added a comment to T11723: Translation of jekyll or hugo based websites .

Ok so I suppose the po files need to be located at locale/$lang/LC_MESSAGES, do I need to make a bash script instead?

Thu, Sep 19, 4:55 PM · Websites, Localization
ltoscano added a comment to T11723: Translation of jekyll or hugo based websites .

Take a look at what krita does:

Thu, Sep 19, 4:47 PM · Websites, Localization
ognarb added a comment to T11723: Translation of jekyll or hugo based websites .

@ltoscano I created a merge request for translating the content of kate-editor.org https://invent.kde.org/websites/kate-editor-org/merge_requests/6

Thu, Sep 19, 4:44 PM · Websites, Localization
ltoscano added a comment to T11723: Translation of jekyll or hugo based websites .
Thu, Sep 19, 3:18 PM · Websites, Localization
ognarb created T11723: Translation of jekyll or hugo based websites .
Thu, Sep 19, 3:11 PM · Websites, Localization
romangg added a comment to T11721: Splitting of i18n strings.

Wasn't this solution mentioned here https://phabricator.kde.org/D23783#527600 ?

You mean like the following?

i18n(Lorem ipsum dolor sit amet, consectetur adipisici elit,\
     sed eiusmod tempor incidunt ut labore et dolore magna aliqua.)

True, the only difference is that the solution mentioned in D23783#527600 can not have an arbitrary indent. I'm not an expert on JavaScript string concatenation capabilities, but it would be nice to have multi-line strings not break the indent of code before and after.

Thu, Sep 19, 12:24 PM · Localization, Kirigami, Plasma
ltoscano added a project to T11721: Splitting of i18n strings: Localization.
Thu, Sep 19, 12:02 PM · Localization, Kirigami, Plasma

Sep 5 2019

huftis abandoned D13219: Locale-aware formatting of numbers on status bar.

Should this be cancelled given this should be fixed on the latest ki18n?

Sep 5 2019, 5:31 PM · Localization

Sep 4 2019

aacid added a comment to D13219: Locale-aware formatting of numbers on status bar.

Should this be cancelled given this should be fixed on the latest ki18n?

Sep 4 2019, 8:33 PM · Localization

Sep 1 2019

huftis added a comment to D13219: Locale-aware formatting of numbers on status bar.

I’ve just tested this, but changing %1 to %L1 doesn’t seem work; the %L1 is displayed verbatim.

Did you test it with Qt's system, or KI18n? I meant to use it with tr() (KF5 Tier 1 libraries that uses Qt localization system, like KI18n).

Sep 1 2019, 5:19 PM · Localization

Aug 10 2019

adrianchavesfernandez added a comment to D15759: Add new ways to launch pology on file(s).

How does this ‘fix’ https://bugs.kde.org/show_bug.cgi?id=198872?

Aug 10 2019, 7:30 AM · Localization

Jul 23 2019

safaalfulaij added a comment to D13219: Locale-aware formatting of numbers on status bar.

I’ve just tested this, but changing %1 to %L1 doesn’t seem work; the %L1 is displayed verbatim.

Jul 23 2019, 2:13 PM · Localization