Skip to content

Commit

Permalink
Try out localization
Browse files Browse the repository at this point in the history
  • Loading branch information
mattesmohr committed Nov 19, 2023
1 parent 503130c commit 3210d28
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 30 deletions.
13 changes: 12 additions & 1 deletion Sources/Website/Localization/de/web.strings
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
/* A friendly greeting. */
/* menu */
"menu.home" = "Übersicht";
"menu.projects" = "Projekte";
"menu.articles" = "Beiträge";
"menu.assets" = "Mediathek";
"menu.reports" = "Berichte";
"menu.users" = "Benutzer";
"menu.legal" = "Impressum";
"menu.privacy" = "Datenschutz";

/* headlines */
"headline.about" = "Über mich";
"headline.projects" = "Projekte";
13 changes: 12 additions & 1 deletion Sources/Website/Localization/en-GB/web.strings
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
/* A friendly greeting. */
/* menu */
"menu.home" = "Home";
"menu.projects" = "Projects";
"menu.articles" = "Articles";
"menu.assets" = "Assets";
"menu.reports" = "Reports";
"menu.users" = "Users";
"menu.legal" = "Legal";
"menu.privacy" = "Privacy";

/* headlines */
"headline.about" = "About";
"headline.projects" = "Projects";
24 changes: 6 additions & 18 deletions Sources/Website/Views/Areas/Shared/AreaViewContainer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,50 +32,38 @@ struct AreaViewContainer: View {
ListRow {
Link(destination: "/area/admin/home/index") {
Symbol(system: "house")
Text {
"Home"
}
Text("menu.home")
}
.fontSize(.extralarge)
}
ListRow {
Link(destination: "/area/admin/projects/index") {
Symbol(system: "folder")
Text {
"Projects"
}
Text("menu.projects")
}
}
ListRow {
Link(destination: "/area/admin/articles/index") {
Symbol(system: "file")
Text {
"Articles"
}
Text("menu.articles")
}
}
ListRow {
Link(destination: "/area/admin/assets/index") {
Symbol(system: "photo")
Text {
"Assets"
}
Text("menu.assets")
}
}
ListRow {
Link(destination: "/area/admin/reports/index") {
Symbol(system: "chart.pie")
Text {
"Report"
}
Text("menu.reports")
}
}
ListRow {
Link(destination: "/area/admin/users/index") {
Symbol(system: "person")
Text {
"Users"
}
Text("menu.users")
}
}
}
Expand Down
12 changes: 4 additions & 8 deletions Sources/Website/Views/HomePage/HomePage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,8 @@ enum HomePage {
}
Section {
HStack {
Text {
"About"
}
.font(.subheadline)
Text("headline.about")
.font(.subheadline)
}
.contentSpace(.around)
HStack {
Expand All @@ -63,10 +61,8 @@ enum HomePage {
}
Section {
HStack {
Text {
"Projects"
}
.font(.subheadline)
Text("headline.projects")
.font(.subheadline)
}
.contentSpace(.around)
HStack {
Expand Down
4 changes: 2 additions & 2 deletions Sources/Website/Views/Shared/ViewContainer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@ struct ViewContainer: View {
List(direction: .horizontal) {
ListRow {
Link(destination: "/impressum/index") {
"Impressum"
Text("menu.legal")
}
}
ListRow {
Link(destination: "/privacy/index") {
"Privacy"
Text("menu.privacy")
}
}
}
Expand Down

0 comments on commit 3210d28

Please sign in to comment.