Commit c6a135a4 authored by Nicolas Fella's avatar Nicolas Fella
Browse files

Add and set domain for i18n call

parent da150a46
# SPDX-FileCopyrightText: None
# SPDX-License-Identifier: CC0-1.0
#!/usr/bin/env bash
$XGETTEXT `find . -name '*.cpp'` -o $podir/kpeoplevcard.pot
......@@ -66,7 +66,7 @@ public:
// If both first and last name are set combine them to a full name
if (!m_addressee.givenName().isEmpty() && !m_addressee.familyName().isEmpty())
return i18nc("given-name family-name", "%1 %2", m_addressee.givenName(), m_addressee.familyName());
return i18ndc("kpeoplevcard", "given-name family-name", "%1 %2", m_addressee.givenName(), m_addressee.familyName());
// If only one of them is set just return what we know
if (!m_addressee.givenName().isEmpty())
  • Hi. What is the motivation to use i18ndc() instead of setting things in the CMakeLists.txt by using


    The latter is the usual approach, using the i18n*d() calls only would be done if really needed.

  • IIRC -DTRANSLATION_DOMAIN doesn't work for plugins? I may be wrong though

  • It works for compiled code. As all it does is to predefine the domain argument to any i18n() calls, so one does not have to do it manually.

    Things fail when the call is done at runtime, like in QML.

Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment