Add translations string catalog

main
Mathieu GROUSSEAU 2 months ago
parent 09c5b9d2e1
commit fe123c9dad

@ -18,6 +18,7 @@
F0F59E4A2DD4958800BE32D6 /* C4Persistance.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = F0F59E412DD492B400BE32D6 /* C4Persistance.xcframework */; };
F0F59E4B2DD4958800BE32D6 /* C4Players.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = F0F59E422DD492B400BE32D6 /* C4Players.xcframework */; };
F0F59E4C2DD4958800BE32D6 /* C4Rules.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = F0F59E442DD492B400BE32D6 /* C4Rules.xcframework */; };
F0F59E4F2DD4996F00BE32D6 /* Localizable.xcstrings in Resources */ = {isa = PBXBuildFile; fileRef = F0F59E4E2DD4996F00BE32D6 /* Localizable.xcstrings */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@ -53,6 +54,7 @@
F0F59E422DD492B400BE32D6 /* C4Players.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = C4Players.xcframework; path = ../precompiled/xcframeworks/C4Players.xcframework; sourceTree = "<group>"; };
F0F59E432DD492B400BE32D6 /* C4.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = C4.xcframework; path = ../precompiled/xcframeworks/C4.xcframework; sourceTree = "<group>"; };
F0F59E442DD492B400BE32D6 /* C4Rules.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = C4Rules.xcframework; path = ../precompiled/xcframeworks/C4Rules.xcframework; sourceTree = "<group>"; };
F0F59E4E2DD4996F00BE32D6 /* Localizable.xcstrings */ = {isa = PBXFileReference; lastKnownFileType = text.json.xcstrings; name = Localizable.xcstrings; path = App/Localizable.xcstrings; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@ -87,6 +89,7 @@
F001A03F2DD48FAB00809561 = {
isa = PBXGroup;
children = (
F0F59E4E2DD4996F00BE32D6 /* Localizable.xcstrings */,
F001A04A2DD48FAB00809561 /* App */,
F001A05C2DD48FAE00809561 /* AppTests */,
F001A0662DD48FAE00809561 /* AppUITests */,
@ -247,6 +250,7 @@
knownRegions = (
en,
Base,
fr,
);
mainGroup = F001A03F2DD48FAB00809561;
productRefGroup = F001A0492DD48FAB00809561 /* Products */;
@ -267,6 +271,7 @@
files = (
F001A0542DD48FAD00809561 /* Preview Assets.xcassets in Resources */,
F001A0502DD48FAD00809561 /* Assets.xcassets in Resources */,
F0F59E4F2DD4996F00BE32D6 /* Localizable.xcstrings in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};

@ -0,0 +1,103 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1540"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"
buildArchitectures = "Automatic">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F001A0472DD48FAB00809561"
BuildableName = "App.app"
BlueprintName = "App"
ReferencedContainer = "container:App.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
<Testables>
<TestableReference
skipped = "NO"
parallelizable = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F001A0582DD48FAE00809561"
BuildableName = "AppTests.xctest"
BlueprintName = "AppTests"
ReferencedContainer = "container:App.xcodeproj">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO"
parallelizable = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F001A0622DD48FAE00809561"
BuildableName = "AppUITests.xctest"
BlueprintName = "AppUITests"
ReferencedContainer = "container:App.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = "en"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F001A0472DD48FAB00809561"
BuildableName = "App.app"
BlueprintName = "App"
ReferencedContainer = "container:App.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F001A0472DD48FAB00809561"
BuildableName = "App.app"
BlueprintName = "App"
ReferencedContainer = "container:App.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

@ -0,0 +1,23 @@
{
"sourceLanguage" : "en",
"strings" : {
"genericAppName" : {
"extractionState" : "manual",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Connect 4"
}
},
"fr" : {
"stringUnit" : {
"state" : "translated",
"value" : "Puissance 4"
}
}
}
}
},
"version" : "1.0"
}

@ -13,7 +13,7 @@ struct ContentView: View {
Image(systemName: "globe")
.imageScale(.large)
.foregroundStyle(.tint)
Text("Hello, world!")
Text(String(localized: "genericAppName"))
}
.padding()
}

Loading…
Cancel
Save