Skip to content

Commit

Permalink
Refactor some root strings
Browse files Browse the repository at this point in the history
  • Loading branch information
keeshux committed Nov 27, 2024
1 parent 32f3b74 commit 9bb116b
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ private extension InstalledProfileView {
if profile != nil {
statusView
} else {
Text("FIXME")
Text(Strings.Views.App.InstalledProfile.None.status)
.foregroundStyle(.secondary)
}
}
Expand All @@ -90,7 +90,7 @@ private extension InstalledProfileView {
}

func nameView() -> some View {
Text(profile?.name ?? Strings.Views.App.Rows.notInstalled)
Text(profile?.name ?? Strings.Views.App.InstalledProfile.None.name)
.font(.title2)
.fontWeight(theme.relevantWeight)
.themeTruncating(.tail)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ struct ProfileCardView: View {
.font(.headline)
.themeTruncating()

Text(preview.subtitle ?? Strings.Views.App.Rows.noModules)
Text(preview.subtitle ?? Strings.Views.App.Profile.noModules)
.multilineTextAlignment(.leading)
.font(.subheadline)
.foregroundStyle(.secondary)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ struct ActiveProfileView: View {

private extension ActiveProfileView {
var currentProfileView: some View {
Text(profile?.name ?? Strings.Views.App.Rows.notInstalled)
Text(profile?.name ?? Strings.Views.App.InstalledProfile.None.name)
.font(.title)
.fontWeight(theme.relevantWeight)
.frame(maxWidth: .infinity, alignment: .leading)
Expand Down
22 changes: 12 additions & 10 deletions Passepartout/Library/Sources/UILibrary/L10n/SwiftGen+Strings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -581,10 +581,6 @@ public enum Strings {
public static let tunnel = Strings.tr("Localizable", "views.app.errors.tunnel", fallback: "Unable to execute tunnel operation.")
}
public enum Folders {
/// Installed profile
public static let activeProfile = Strings.tr("Localizable", "views.app.folders.active_profile", fallback: "Installed profile")
/// Add profile
public static let addProfile = Strings.tr("Localizable", "views.app.folders.add_profile", fallback: "Add profile")
/// My profiles
public static let `default` = Strings.tr("Localizable", "views.app.folders.default", fallback: "My profiles")
/// No profiles
Expand All @@ -594,16 +590,22 @@ public enum Strings {
public static let migrate = Strings.tr("Localizable", "views.app.folders.no_profiles.migrate", fallback: "Migrate old profiles...")
}
}
public enum InstalledProfile {
public enum None {
/// Select a profile
public static let name = Strings.tr("Localizable", "views.app.installed_profile.none.name", fallback: "Select a profile")
/// FIXME
public static let status = Strings.tr("Localizable", "views.app.installed_profile.none.status", fallback: "FIXME")
}
}
public enum Profile {
/// No active modules
public static let noModules = Strings.tr("Localizable", "views.app.profile.no_modules", fallback: "No active modules")
}
public enum ProfileContext {
/// Connect to
public static let connectTo = Strings.tr("Localizable", "views.app.profile_context.connect_to", fallback: "Connect to")
}
public enum Rows {
/// No active modules
public static let noModules = Strings.tr("Localizable", "views.app.rows.no_modules", fallback: "No active modules")
/// Select a profile
public static let notInstalled = Strings.tr("Localizable", "views.app.rows.not_installed", fallback: "Select a profile")
}
public enum Toolbar {
/// Import profile
public static let importProfile = Strings.tr("Localizable", "views.app.toolbar.import_profile", fallback: "Import profile")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,10 @@
"views.about.credits.notices" = "Notices";
"views.about.credits.translations" = "Translations";

"views.app.rows.not_installed" = "Select a profile";
"views.app.rows.no_modules" = "No active modules";
"views.app.folders.active_profile" = "Installed profile";
"views.app.installed_profile.none.name" = "Select a profile";
"views.app.installed_profile.none.status" = "FIXME";
"views.app.profile.no_modules" = "No active modules";
"views.app.folders.default" = "My profiles";
"views.app.folders.add_profile" = "Add profile";
"views.app.folders.no_profiles" = "No profiles";
"views.app.folders.no_profiles.migrate" = "Migrate old profiles...";
"views.app.toolbar.new_profile.empty" = "Empty profile";
Expand Down

0 comments on commit 9bb116b

Please sign in to comment.