fix basename handling of po files
ClosedPublic

Authored by sitter on Apr 24 2017, 7:58 AM.

Details

Summary

get_filename_component(... ... NAME_WE) gets the name without the *longest*
extension. in case of 'org.kde.plasma.kittens.po' that would leave us
with 'org' as name. Use a regular expression to grab the basename without
the short extension (e.g. 'org.kde.plasma.kittens') to prevent broken file
names.

add a test to assert that this works in the future

BUG: 379116

Diff Detail

Repository
R249 KI18n
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
sitter created this revision.Apr 24 2017, 7:58 AM
Restricted Application added a project: Frameworks. · View Herald TranscriptApr 24 2017, 7:58 AM
Restricted Application added a subscriber: Frameworks. · View Herald Transcript
apol accepted this revision.Apr 24 2017, 4:19 PM

Lgtm, thanks for the test!

cmake/build-pofiles.cmake
35 ↗(On Diff #13728)

You don't need the second set of ()

This revision is now accepted and ready to land.Apr 24 2017, 4:19 PM
This revision was automatically updated to reflect the committed changes.