New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

With lang set to != en_US some things won't work #797

Closed
abucodonosor opened this Issue Sep 11, 2017 · 15 comments

Comments

Projects
None yet
4 participants
@abucodonosor
Contributor

abucodonosor commented Sep 11, 2017

Submission type

  • [*] Bug report

Info regarding which version of Calamares is used, which Distribution

calamares 3.1.4
KPMcore 3.1.2
Frugalware Linux ( but the used Distribution doesn't matter )

What do you expect to have happen when Calamares installs?

Everthing to work even with other languages.

Describe the issue you encountered

The bug is in KPMcore to start with and this issue is reported already there:
https://bugs.kde.org/show_bug.cgi?id=364648

Since the filesystems are being translated we get the translated
string back from KPMcore and so simple checks fails or the condition
won't trigger in calamares.

We look in some places for:

....["fs"] == fstype

to decide what to do for swap , luks , detect btrfs and so on.

Eg: we look for 'linuxswap' but get back the fs type being 'Linux-Swap'
or Swap or whatever is translated to so the condition never triggers.

Steps to reproduce the problem

start calamares from konsole with LANG set to de_DE as example:

LC_ALL=de_DE.utf8 pkexec calamares -d

Try to install with LUKS as example .. or simple install and watch
for swap being added correctly

@stikonas

This comment has been minimized.

Show comment
Hide comment
@stikonas

stikonas Sep 11, 2017

Contributor

@adriaandegroot Should we try to keep both translated and untranslated fstypes (in two different variables).

Contributor

stikonas commented Sep 11, 2017

@adriaandegroot Should we try to keep both translated and untranslated fstypes (in two different variables).

@philmmanjaro

This comment has been minimized.

Show comment
Hide comment
@philmmanjaro

philmmanjaro Sep 12, 2017

Member

It would be better to simply convert all to lowercase and check then.

Member

philmmanjaro commented Sep 12, 2017

It would be better to simply convert all to lowercase and check then.

@abucodonosor

This comment has been minimized.

Show comment
Hide comment
@abucodonosor

abucodonosor Sep 12, 2017

Contributor

no .. is not about only lower case .. see linuxswap example ..

so you get the Linux-Swap -> linux-swap which is still broken

Contributor

abucodonosor commented Sep 12, 2017

no .. is not about only lower case .. see linuxswap example ..

so you get the Linux-Swap -> linux-swap which is still broken

philmmanjaro added a commit to manjaro/calamares that referenced this issue Sep 12, 2017

philmmanjaro added a commit to manjaro/calamares that referenced this issue Sep 12, 2017

philmmanjaro added a commit to manjaro/calamares that referenced this issue Sep 12, 2017

philmmanjaro added a commit to manjaro/calamares that referenced this issue Sep 12, 2017

philmmanjaro added a commit to manjaro/calamares that referenced this issue Sep 12, 2017

philmmanjaro added a commit to manjaro/calamares that referenced this issue Sep 12, 2017

philmmanjaro added a commit to manjaro/calamares that referenced this issue Sep 12, 2017

@philmmanjaro

This comment has been minimized.

Show comment
Hide comment
@philmmanjaro

philmmanjaro Sep 12, 2017

Member

@abucodonosor: this makes now totally sense that we have some issues when used non en_US.

Member

philmmanjaro commented Sep 12, 2017

@abucodonosor: this makes now totally sense that we have some issues when used non en_US.

@abucodonosor

This comment has been minimized.

Show comment
Hide comment
@abucodonosor

abucodonosor Sep 12, 2017

Contributor

@philmmanjaro

yes .. I tested most of the time en_US but then did some test installs in de_DE , fr etc
and stuff startet to break all over the place.

then saw the translated strings comming in and all was clear to me :)

Contributor

abucodonosor commented Sep 12, 2017

@philmmanjaro

yes .. I tested most of the time en_US but then did some test installs in de_DE , fr etc
and stuff startet to break all over the place.

then saw the translated strings comming in and all was clear to me :)

philmmanjaro added a commit to manjaro/calamares that referenced this issue Sep 12, 2017

@philmmanjaro

This comment has been minimized.

Show comment
Hide comment
@philmmanjaro

philmmanjaro Sep 12, 2017

Member

@adriaandegroot & @stikonas: I've tested now my last changes. Seems to work now.

Member

philmmanjaro commented Sep 12, 2017

@adriaandegroot & @stikonas: I've tested now my last changes. Seems to work now.

philmmanjaro added a commit to manjaro/calamares that referenced this issue Sep 12, 2017

philmmanjaro added a commit to manjaro/calamares that referenced this issue Sep 12, 2017

@philmmanjaro

This comment has been minimized.

Show comment
Hide comment
@philmmanjaro

philmmanjaro Sep 12, 2017

Member

Hmm, strip("-") seems not yet to work ...

Member

philmmanjaro commented Sep 12, 2017

Hmm, strip("-") seems not yet to work ...

@stikonas

This comment has been minimized.

Show comment
Hide comment
@stikonas

stikonas Sep 12, 2017

Contributor

Well, we need to fix it properly in kpmcore... These workarounds would be too unreliable since we can't predict what translators would do. At some point they can supply some different fs name translation and things will break again.

Contributor

stikonas commented Sep 12, 2017

Well, we need to fix it properly in kpmcore... These workarounds would be too unreliable since we can't predict what translators would do. At some point they can supply some different fs name translation and things will break again.

philmmanjaro added a commit to manjaro/calamares that referenced this issue Sep 12, 2017

@philmmanjaro

This comment has been minimized.

Show comment
Hide comment
@philmmanjaro

philmmanjaro Sep 12, 2017

Member

I've just looked the translations. Most of them used linuxswap as translations. Also I see variations of these:

de/kpmcore.po:msgid "linuxswap"
de/kpmcore.po:msgstr "Linux-Swap"
is/kpmcore.po:msgid "linuxswap"
is/kpmcore.po:msgstr "swap"
nds/kpmcore.po:msgid "linuxswap"
nds/kpmcore.po:msgstr "Linux-Swap"
ug/kpmcore.po:msgid "linuxswap"
ug/kpmcore.po:msgstr "swap"
Member

philmmanjaro commented Sep 12, 2017

I've just looked the translations. Most of them used linuxswap as translations. Also I see variations of these:

de/kpmcore.po:msgid "linuxswap"
de/kpmcore.po:msgstr "Linux-Swap"
is/kpmcore.po:msgid "linuxswap"
is/kpmcore.po:msgstr "swap"
nds/kpmcore.po:msgid "linuxswap"
nds/kpmcore.po:msgstr "Linux-Swap"
ug/kpmcore.po:msgid "linuxswap"
ug/kpmcore.po:msgstr "swap"

philmmanjaro added a commit to manjaro/calamares that referenced this issue Sep 12, 2017

[modules] work on #797 and #796
- this is a workaround and might need to be reverted.
@philmmanjaro

This comment has been minimized.

Show comment
Hide comment
@philmmanjaro

philmmanjaro Sep 12, 2017

Member

I created now a workaround which works for all cases fo linuxswap as given in kpmcore v3.1.2. Also the btrfs issue is now covered.

@stikonas: please keep me in the loop when you have a proper fix added to kpmcore, which I may test also on my end.

Member

philmmanjaro commented Sep 12, 2017

I created now a workaround which works for all cases fo linuxswap as given in kpmcore v3.1.2. Also the btrfs issue is now covered.

@stikonas: please keep me in the loop when you have a proper fix added to kpmcore, which I may test also on my end.

@adriaandegroot

This comment has been minimized.

Show comment
Hide comment
@adriaandegroot

adriaandegroot Sep 14, 2017

Contributor

The "big" problem is going to be свап and سؤإب

Contributor

adriaandegroot commented Sep 14, 2017

The "big" problem is going to be свап and سؤإب

@adriaandegroot

This comment has been minimized.

Show comment
Hide comment
@adriaandegroot

adriaandegroot Sep 14, 2017

Contributor

.. which is why we need a means to access the untranslated name, as well as the translated name.

Contributor

adriaandegroot commented Sep 14, 2017

.. which is why we need a means to access the untranslated name, as well as the translated name.

philmmanjaro added a commit to manjaro/calamares that referenced this issue Sep 14, 2017

philmmanjaro added a commit to manjaro/calamares that referenced this issue Sep 14, 2017

philmmanjaro added a commit to manjaro/calamares that referenced this issue Sep 14, 2017

philmmanjaro added a commit to manjaro/calamares that referenced this issue Sep 14, 2017

philmmanjaro added a commit to manjaro/calamares that referenced this issue Sep 14, 2017

philmmanjaro added a commit to manjaro/calamares that referenced this issue Sep 14, 2017

philmmanjaro added a commit to manjaro/calamares that referenced this issue Sep 14, 2017

FS: use untranslated name to identify filesystem
Resolves issue where 'linuxswap' is translated to 'Linux-Swap',
for instance. FileSystem::name() provides a translated name,
not an untranslated one.

This should move to KPMCore.

FIXES #797
@philmmanjaro

This comment has been minimized.

Show comment
Hide comment
@philmmanjaro

philmmanjaro Sep 14, 2017

Member

@adriaandegroot we should update as needed when a new version of kpmcore got released. With the current code of CAL I see no pressure yet. @stikonas: thx for fixing it in kpmcore.

Member

philmmanjaro commented Sep 14, 2017

@adriaandegroot we should update as needed when a new version of kpmcore got released. With the current code of CAL I see no pressure yet. @stikonas: thx for fixing it in kpmcore.

@stikonas

This comment has been minimized.

Show comment
Hide comment
@stikonas

stikonas Sep 15, 2017

Contributor

@adriaandegroot actually after reading some more docs I am thinking that we shouldn't duplicate strings. Any objections to using KLocalizedString instead? It allows retrieving untranslated version of the string. Sounds a bit less hacky...

Contributor

stikonas commented Sep 15, 2017

@adriaandegroot actually after reading some more docs I am thinking that we shouldn't duplicate strings. Any objections to using KLocalizedString instead? It allows retrieving untranslated version of the string. Sounds a bit less hacky...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment