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"
9#include <KLocalizedString>
10
11QString IncidenceEditorNG::translateLDAPAttributeForDisplay(const QString &attribute)
12{
13 QString ret = attribute;
14 if (attribute == QLatin1StringView("cn")) {
15 ret = i18nc("ldap attribute cn", "Common name");
16 } else if (attribute == QLatin1StringView("mail")) {
17 ret = i18nc("ldap attribute mail", "Email");
18 } else if (attribute == QLatin1StringView("givenname")) {
19 ret = i18nc("ldap attribute givenname", "Given name");
20 } else if (attribute == QLatin1StringView("sn")) {
21 ret = i18nc("ldap attribute sn", "Surname");
22 } else if (attribute == QLatin1StringView("ou")) {
23 ret = i18nc("ldap attribute ou", "Organization");
24 } else if (attribute == QLatin1StringView("objectClass")) {
25 ret = i18nc("ldap attribute objectClass", "Object class");
26 } else if (attribute == QLatin1StringView("description")) {
27 ret = i18nc("ldap attribute description", "Description");
28 } else if (attribute == QLatin1StringView("telephoneNumber")) {
29 ret = i18nc("ldap attribute telephoneNumber", "Telephone");
30 } else if (attribute == QLatin1StringView("mobile")) {
31 ret = i18nc("ldap attribute mobile", "Mobile");
32 }
33 return ret;
34}
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 Tue Mar 26 2024 11:19:37 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.