Bug 394381 - Translations are not built when building from git
Summary: Translations are not built when building from git
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Translation (show other bugs)
Version: 4.0.3
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-17 16:24 UTC by Peter Eszlari
Modified: 2018-05-23 09:56 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Eszlari 2018-05-17 16:24:53 UTC
I have updated Krita to 4.0 on Flathub. But for some reason the translations are not built/installed. I have tried to find the cause, but no luck so far.

Any hint what is going on?
Have there been some recent changes?
Are translations deactivated in git? (I have updated from the "krita/4.0" branch)
Comment 1 Halla Rempt 2018-05-17 16:31:25 UTC
Translations are only copied into the source when we generate the tarballs. I'm not happy with this mechanism, but it's KDE-wide, but a discussion on the relevant mailing on how to change this wasn't conclusive.
Comment 2 Peter Eszlari 2018-05-17 16:44:14 UTC
(In reply to Boudewijn Rempt from comment #1)
> Translations are only copied into the source when we generate the tarballs.

From where (URL)? I could pull them before build automatically.
Comment 3 Peter Eszlari 2018-05-17 17:47:31 UTC
I extracted the translations from krita-4.0.3.tar.gz to "krita-src/po", but they didn't get picked up by the build system. Is there something else that needs to be modified?
Comment 4 Halla Rempt 2018-05-17 18:07:20 UTC
It also adds two lines to the end of the CMakeLists.txt file:

find_package(KF5I18n CONFIG REQUIRED)
ki18n_install(po)
Comment 5 Peter Eszlari 2018-05-17 18:17:40 UTC
Couldn't this be made conditional?
Comment 6 Halla Rempt 2018-05-17 18:18:45 UTC
Sure it could, but the release process doesn't really support that :-(
Comment 7 Peter Eszlari 2018-05-17 18:25:47 UTC
This wouldn't work?

if(EXISTS po)
  find_package(KF5I18n CONFIG REQUIRED)
  ki18n_install(po)
endif
Comment 8 Halla Rempt 2018-05-17 21:01:29 UTC
Well, sure, but the release scripts would still add the two lines to the end, again...
Comment 9 Halla Rempt 2018-05-18 12:52:50 UTC
Git commit c8b8a016e9d0c9aa801e06ad62fd57c5d3a5319d by Boudewijn Rempt.
Committed on 18/05/2018 at 12:52.
Pushed by rempt into branch 'master'.

If there translations in the build or src dir, install them

Note: I have no idea whether the createtarball ruby script would
still add this code at the end of the top-level CMakeLists.txt
file...

Second note: to fetch the translations, run cmake with the following
option:

cmake ../krita -DKDE_L10N_AUTO_TRANSLATIONS=ON -D... This will
fetch the translations from subversion (so svn needs to be installed).
If you build master, it will fetch the right translations.

Not sure whether if you're on the stable branch, it will automatically
know that that's the stable branch...

You can also run "make fetch-translations" manually.

CCMAIL:kimageshop@kde.org

M  +5    -0    CMakeLists.txt

https://commits.kde.org/krita/c8b8a016e9d0c9aa801e06ad62fd57c5d3a5319d
Comment 10 Halla Rempt 2018-05-23 09:56:47 UTC
Git commit 2388362cea303aeff9e03577d4774d0f57a185d9 by Boudewijn Rempt.
Committed on 23/05/2018 at 09:31.
Pushed by rempt into branch 'krita/4.0'.

If there translations in the build or src dir, install them

Note: I have no idea whether the createtarball ruby script would
still add this code at the end of the top-level CMakeLists.txt
file...

Second note: to fetch the translations, run cmake with the following
option:

cmake ../krita -DKDE_L10N_AUTO_TRANSLATIONS=ON -D... This will
fetch the translations from subversion (so svn needs to be installed).
If you build master, it will fetch the right translations.

Not sure whether if you're on the stable branch, it will automatically
know that that's the stable branch...

You can also run "make fetch-translations" manually.

CCMAIL:kimageshop@kde.org
(cherry picked from commit c8b8a016e9d0c9aa801e06ad62fd57c5d3a5319d)

M  +5    -0    CMakeLists.txt

https://commits.kde.org/krita/2388362cea303aeff9e03577d4774d0f57a185d9