Files
element-x-ios/ElementX/Sources/Generated/Strings+HealthChat.swift
T
joel.poyet dffeb4f9bb Show extended profile details on the profile screens (#10)
* Add HealthChat API and extended profile services

Expose OpenID tokens and homeserver credentials from the client proxy, and
add fork-only services for the HealthChat member directory backend
(api.healthchat.ch) plus a service that reads MSC4133 extended profile
fields directly from the homeserver. Groundwork for the members tab and
the profile screens.

Claude-Session: https://claude.ai/code/session_013qdTbAWsZj2quQzEkagXaS

* Show extended profile details on the profile screens

Add a UserProfileScreenHook that lets the fork inject an extra Form
section below the header of the user profile and room member details
screens. The HealthChat implementation loads the MSC4133 extended
profile fields and renders them with tappable phone/email/website
links, hiding the section entirely for profiles without any fields.

Strings live in a new fork-only HealthChat.strings table (de/en/fr,
generated as HealthChatL10n via SwiftGen) since Untranslated.strings
pins the English bundle.

Claude-Session: https://claude.ai/code/session_013qdTbAWsZj2quQzEkagXaS
2026-10-19 09:17:31 +02:00

62 lines
2.8 KiB
Swift

// swiftlint:disable all
// Generated using SwiftGen — https://github.com/SwiftGen/SwiftGen
import Foundation
// swiftlint:disable superfluous_disable_command file_length implicit_return
// MARK: - Strings
// swiftlint:disable explicit_type_interface function_parameter_count identifier_name line_length
// swiftlint:disable nesting type_body_length type_name vertical_whitespace_opening_braces
internal nonisolated enum HealthChatL10n {
/// Title
internal static var commonAcademicTitle: String { return HealthChatL10n.tr("HealthChat", "common_academic_title") }
/// Address
internal static var commonAddress: String { return HealthChatL10n.tr("HealthChat", "common_address") }
/// Business email
internal static var commonBusinessEmail: String { return HealthChatL10n.tr("HealthChat", "common_business_email") }
/// Business phone
internal static var commonBusinessTel: String { return HealthChatL10n.tr("HealthChat", "common_business_tel") }
/// Further infos / qualifications
internal static var commonFurtherInfo: String { return HealthChatL10n.tr("HealthChat", "common_further_info") }
/// Practice name
internal static var commonPracticeName: String { return HealthChatL10n.tr("HealthChat", "common_practice_name") }
/// Speciality
internal static var commonSpecialty: String { return HealthChatL10n.tr("HealthChat", "common_specialty") }
/// Website
internal static var commonWebsite: String { return HealthChatL10n.tr("HealthChat", "common_website") }
}
// swiftlint:enable explicit_type_interface function_parameter_count identifier_name line_length
// swiftlint:enable nesting type_body_length type_name vertical_whitespace_opening_braces
// MARK: - Implementation Details
nonisolated extension HealthChatL10n {
static func tr(_ table: String, _ key: String, _ args: CVarArg...) -> String {
// Use preferredLocalizations to get a language that is in the bundle and the user's preferred list of languages.
let languages = Bundle.overrideLocalizations ?? Bundle.app.preferredLocalizations
for language in languages {
if let translation = trIn(language, table, key, args) {
return translation
}
}
return Bundle.app.developmentLocalization.flatMap { trIn($0, table, key, args) } ?? key
}
private static func trIn(_ language: String, _ table: String, _ key: String, _ args: CVarArg...) -> String? {
guard let bundle = Bundle.lprojBundle(for: language) else { return nil }
let format = NSLocalizedString(key, tableName: table, bundle: bundle, comment: "")
let translation = String(format: format, locale: Locale(identifier: language), arguments: args)
guard translation != key,
translation != "\(key) \(key)" // Handle double pseudo for tests
else {
return nil
}
return translation
}
}
// swiftlint:enable all