Incidenceeditor

ldaputils.cpp
1/*
2 * SPDX-FileCopyrightText: 2014 Sandro Knauß <knauss@kolabsys.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
5 *
6 */
7
8#include "ldaputils.h"
9using namespace Qt::Literals::StringLiterals;
10
11#include <KLocalizedString>
12
13QString IncidenceEditorNG::translateLDAPAttributeForDisplay(const QString &attribute)
14{
15 QString ret = attribute;
16 if (attribute == "cn"_L1) {
17 ret = i18nc("ldap attribute cn", "Common name");
18 } else if (attribute == "mail"_L1) {
19 ret = i18nc("ldap attribute mail", "Email");
20 } else if (attribute == "givenname"_L1) {
21 ret = i18nc("ldap attribute givenname", "Given name");
22 } else if (attribute == "sn"_L1) {
23 ret = i18nc("ldap attribute sn", "Surname");
24 } else if (attribute == "ou"_L1) {
25 ret = i18nc("ldap attribute ou", "Organization");
26 } else if (attribute == "objectClass"_L1) {
27 ret = i18nc("ldap attribute objectClass", "Object class");
28 } else if (attribute == "description"_L1) {
29 ret = i18nc("ldap attribute description", "Description");
30 } else if (attribute == "telephoneNumber"_L1) {
31 ret = i18nc("ldap attribute telephoneNumber", "Telephone");
32 } else if (attribute == "mobile"_L1) {
33 ret = i18nc("ldap attribute mobile", "Mobile");
34 }
35 return ret;
36}
QString i18nc(const char *context, const char *text, const TYPE &arg...)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:17:23 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.