From 94207621ee768ddedf0021aef99566a8ce90d22b Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Mon, 13 Jun 2022 16:19:19 +0200 Subject: qmake: Document Xcode behavior when bundling translation files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Xcode's legacy and new build system modes have different behavior in how they bundle resource paths that start with lang_code.lproj. Document how to bundle translation files for both legacy and new build systems. Pick-to: 5.15 6.2 6.3 6.4 Fixes: QTBUG-98417 Change-Id: I857ec76577f8244a751d4bf38fbe305fef614734 Reviewed-by: Alexey Edelev Reviewed-by: Jörg Bornemann Reviewed-by: Kai Koehne --- qmake/doc/src/qmake-manual.qdoc | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'qmake/doc/src') diff --git a/qmake/doc/src/qmake-manual.qdoc b/qmake/doc/src/qmake-manual.qdoc index a8002d816e..6255e0e451 100644 --- a/qmake/doc/src/qmake-manual.qdoc +++ b/qmake/doc/src/qmake-manual.qdoc @@ -1876,6 +1876,33 @@ See \l{Platform Notes#Creating Frameworks}{Platform Notes} for more information about creating library bundles. + A project can also use this variable to bundle application translation + files. The exact syntax depends on whether the project is using Xcode's + legacy build system or its new build system. + + For example when the following project snippet is built using the + legacy build system: + + \snippet code/doc_src_qmake-manual.pro 188 + + Xcode will ignore the original location of \c InfoPlist.strings + and the file will placed into the bundle \c Resources directory + under the provided \c translations_en.path path, so + \c Resources/en.lproj/InfoPlist.strings + + With the new build system, the relative location of the file is + preserved, which means the file will incorrectly be placed under + \c Resources/en.lproj/en.lproj/InfoPlist.strings + + To ensure correct file placement, the project can either move + the original file not to be in a sub-directory or it can choose + not to specify the \c translations_en.path variable. + + \snippet code/doc_src_qmake-manual.pro 189 + + See \qtbug QTBUG-98417 for more details on how the Xcode build + system changed its behavior in bundling translation files. + \section1 QMAKE_BUNDLE_EXTENSION \note This variable is used on \macos, iOS, tvOS, and watchOS only. -- cgit v1.2.3