Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linphone-desktop
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
linphone-desktop
Commits
cb31880c
Commit
cb31880c
authored
Jun 16, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore(CMakeLists.txt): remove `CR` in translation files on windows
parent
bb704cbe
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
4 deletions
+22
-4
CMakeLists.txt
CMakeLists.txt
+2
-1
CMakeLists.txt
assets/languages/CMakeLists.txt
+8
-3
clean_translations.cmake
assets/languages/clean_translations.cmake
+12
-0
No files found.
CMakeLists.txt
View file @
cb31880c
...
...
@@ -227,7 +227,8 @@ foreach (line ${QRC_RESOURCES_CONTENT})
"^[
\t
]*<[
\t
]*file[
\t
]*>[
\t
]*(.+
\\
.[a-z]+)[
\t
]*<[
\t
]*/[
\t
]*file[
\t
]*>[
\t
]*$"
"
\\
1"
result
${
line
}
)
"
${
line
}
"
)
string
(
REGEX MATCH
"
\\
.[a-z]+$"
isUi
${
result
}
)
if
(
NOT
${
isUi
}
STREQUAL
""
)
list
(
APPEND QML_SOURCES
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/
${
result
}
"
)
...
...
assets/languages/CMakeLists.txt
View file @
cb31880c
...
...
@@ -5,7 +5,7 @@
# This line prevent `.ts` files deletion.
# See: https://bugreports.qt.io/browse/QTBUG-31860
#
# On October 17, 2016, this issue
i
s marked `invalid` but it's a
# On October 17, 2016, this issue
wa
s marked `invalid` but it's a
# bullshit. It's not tolerated to remove sources files.
set_directory_properties
(
PROPERTIES CLEAN_NO_CUSTOM true
)
...
...
@@ -26,8 +26,13 @@ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/${I18N_FILENAME}" "${I18N_CONTENT}")
# Create `qm` files from `ts` files.
qt5_create_translation
(
QM_FILES
${
TS_FILES
}
${
SOURCES
}
${
HEADERS
}
${
QML_SOURCES
}
OPTIONS -no-obsolete
)
# Translations target must be called by `make`|`make all`.
add_custom_target
(
update_translations DEPENDS
${
QM_FILES
}
)
# Update translations.
add_custom_target
(
update_translations
COMMAND
${
CMAKE_COMMAND
}
"-DLANGUAGES=
\"
${
LANGUAGES
}
\"
"
-P
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/clean_translations.cmake"
DEPENDS
${
QM_FILES
}
WORKING_DIRECTORY
"
${
CMAKE_CURRENT_SOURCE_DIR
}
"
)
# Remove `*.qm` when `clean` is called.
set_directory_properties
(
PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES
"
${
QM_FILES
}
"
)
...
...
assets/languages/clean_translations.cmake
0 → 100644
View file @
cb31880c
# ==============================================================================
# assets/languages/clean_translations.cmake
# ==============================================================================
if
(
WIN32
)
foreach
(
lang
${
LANGUAGES
}
)
file
(
READ
"
${
lang
}
.ts"
content
)
set
(
cleanedContent
)
string
(
REPLACE
"
\r
"
""
cleanedContent
"
${
content
}
"
)
file
(
WRITE
"
${
lang
}
.ts"
"
${
cleanedContent
}
"
)
endforeach
()
endif
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment