Discover String Catalogs

RSS for tag

Discuss the WWDC23 Session Discover String Catalogs

View Session

Posts under wwdc2023-10155 tag

20 Posts
Sort by:
Post marked as solved
1 Replies
1.2k Views
Hey, I'm trying the new strings catalog, and I have a script that I would like to run on the xcstrings json. My question is there some documentation on the json format (what keys can it have, and values)? Also, I didn't try it yet, but what if I set for example 50 languages and 1000 localization keys, is that json really scalable? It could grow quite large, would xcode still keep it as one big file, or it would somehow split it into chunks? Would be happy for any info from the dev teams, thanks!
Posted
by simonb_tp.
Last updated
.
Post marked as solved
6 Replies
2.8k Views
Hello, do the String Catalogs (new in Xcode 15) support Swift Packages? I've tried adding a new Localizable.xcstrings (string catalog) file to my package's resources folder. Great! I then see this screen: All good so far. I then try to go and build my Swift Package... and nothing changes. The string catalog is never populated and I'm left with the same screen as above. So, do string catalogs not support packages at this time or am I doing something wrong? I was really hoping String Catalogs would work and save the day since Export Localizations also does not work for Swift packages that don't support macOS. 😔
Posted
by kernelpop.
Last updated
.
Post not yet marked as solved
0 Replies
419 Views
Hi, still without any success I can’t recreate the ui tests that will highlights the string in the screenshot like it’s shown in WWDC 2019 - 403. I even submitted feedback via Feedback Assistant 3 months ago. FB12284285 https://developer.apple.com/videos/play/wwdc2019/403/ I would love to see this finally works with string catalogs. Thanks
Posted Last updated
.
Post marked as solved
1 Replies
785 Views
Why is the custom localized string macro name only allowed for Objective C and C code? I have a wrapper class for localization which is a Swift function. I'm unable to get the strings i pass to it localized. Is there any way to get it working other than writing an objective C class and adding it to the bridging header?
Posted Last updated
.
Post not yet marked as solved
0 Replies
498 Views
I am typing string text on textDocumentProxy in a custom keyboard app. The input text includes newlines and punctuation letters, but when I try to edit the textDocumentProxy field, the textDocumentProxy.documentContextBeforeInput in case a newline \n is included, it does not return full content before input. I placed the cursor on after the good morning word center, I got only good string text. The remaining "hi folks", words do not return. Here are some examples I have tried. var inputText = "Hi folks, Good morning to everyone " var txtBeforeCursor = textDocumentProxy.documentContextBeforeInput ?? "" print("Before Cursor text : ",txtBeforeCursor) Output is: Before Cursor text : Good
Posted Last updated
.
Post marked as solved
1 Replies
637 Views
I have an App with multiple string catalogs. I mistyped the name of a table in one of my String(localized: "Some English Text", table "nonExistingTable") instances. I did not receive a compile-time warning telling me the table was missing and my application defaulted to the English text instead. Is this expected behaviour or a bug?
Posted Last updated
.
Post marked as solved
3 Replies
1.6k Views
Our app is not localized but we want to begin the localization process starting with push notifications we are going to integrate. The documentation notes: you can store your message strings in the Localizable.strings file of your app bundle and use the title-loc-key, subtitle-loc-key, and loc-key payload keys to specify which strings you want to display String Catalogs in Xcode 15 supersedes Localizable.strings. How do you support this when using String Catalogs? Do you just manually add a Localizable.xcstrings file to your project then manually add a new entry for your loc-key, and the system will find this string without issue? Or will we need to have a Localizable.strings file too?
Posted
by Jordan.
Last updated
.
Post not yet marked as solved
0 Replies
645 Views
I have English as the base language but I also support English (UK) which defines a few UK specific localizations but should fall back to English for everything else. The way I have it now, all my fallback strings are in "New" state in the UK localization, ie they don't have a UK specific string. This actually works, but UK completion is at 5% and I can't find a way to tell it that the rest are OK to be taken from the base language. By keeping a lot of "New" strings, the tool won't be helping me when I add more strings to the base language. Marking those as Reviewed creates a blank string localization which is obviously not what I need. BTW if marking as reviewed would help here, it would be a pain because it has to be done one by one, I can't multi select.
Posted
by gbuela.
Last updated
.
Post not yet marked as solved
1 Replies
874 Views
I migrated to String Catalog in my app. That worked fine, and everything is OK in the Simulator and even on a real device. However, After I deployed the App and it became available in the AppStore, I started receiving Feedback from some users. Seems my app is no longer doing localization. It always presents itself in its development language. Has anyone else experienced this?
Posted
by mimo74.
Last updated
.
Post not yet marked as solved
0 Replies
689 Views
My app has the Text views that display the value of variables. Below are two sample pieces of code and the String Catalog (Localizable.xcstrings) entries created when app builds: (1) Code: Text("[ (var1) ]") Key: [ %@ ] Default: [ %@ ] Spanish: [ %@ ] (2) Code: Text("(var2) - (var3) - (var4)") Key: %@ / %@ / %@ Default: %1$@ / %2$@ / %3$@ Spanish: %1$@ / %2$@ / %3$@ Each of the 4 vars have a discrete number of known possible values. How do I enter the possible var values and their associated Spanish translations in the String Catalog?
Posted
by mikemjc.
Last updated
.
Post not yet marked as solved
1 Replies
508 Views
When adding a new language I added something I don't intend on supporting however you are unable to delete an added language once added. Yes, I could edit the file as source code and remove all the e.g. de-DE references but that shouldn't be needed. Edit: Submitted this as feedback via FB12576340
Posted Last updated
.
Post not yet marked as solved
2 Replies
911 Views
Hi, I've been using string files to localize incoming remote notifications like this: "training_new_title" = "New training added"; "training_new_body" = "A new training on %@ has been added"; Following the migration to the new string dicts it looks like this: "training_new_body" : { "extractionState" : "manual", "localizations" : { "en" : { "stringUnit" : { "state" : "translated", "value" : "A new training on %@ has been added" } }, "nl" : { "stringUnit" : { "state" : "translated", "value" : "Een nieuwe training op %@ is toegevoegd" } } } }, "training_new_title" : { "extractionState" : "manual", "localizations" : { "en" : { "stringUnit" : { "state" : "translated", "value" : "New training added" } }, "nl" : { "stringUnit" : { "state" : "translated", "value" : "Nieuwe training toegevoegd" } } } }, Unfortunately as said before notifications are no longer localized and come in as their normal state: "training_new_title" & "training_new_body" . I am using Firebase messaging service, they send a APNS, that looks like this: notification: { titleLocKey: "training_new_title", bodyLocKey: "training_new_body", bodyLocArgs: bodyPayload, } Do string dicts require any extra steps apart from the standard that I have implemented? func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable: Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) { completionHandler(.newData) } Thanks in advance for any insights
Posted
by Jeroeneo.
Last updated
.
Post not yet marked as solved
1 Replies
1.4k Views
In my project I have 3 targets. A macOS target, a target for iPhone and a target for iPad. The macOS App has an own Localizable file and I have been able to convert this to string catalog without any issues. I like this catalog! But when I try to convert the Localizable file that is shared between 2 targets, then targets fail to compile afterwards with the following error message: ...mul.lproj/Localizable.xcstrings:1:1 Localizable.xcstrings cannot co-exist with other .strings or .stringsdict tables with the same name. Does anybody have an idea how I can resolve this? Do I need to keep individual copies of the Localizable file for these 2 targets?
Posted
by Fribi.
Last updated
.
Post not yet marked as solved
0 Replies
628 Views
We use a localization service that allows us to export our translated strings in .xliff format. When I import the spanish (es.xliff) file into the string catalogs it imports the english keys and leaves the spanish translation column empty, which causes it to default to English. I created feedback 12429535 and 12429469 because it seems the feedback site is broken and shows it cannot find the feedback I just submitted.
Posted Last updated
.
Post not yet marked as solved
0 Replies
617 Views
Seems like a bug on the Xcode 15.0 beta. Steps to reproduce: Create a new empty Static Library project in Xcode (objective-C) Add a String Catalog file Add a dummy function which includes NSString *str = NSLocalizeString(@"test string", @"comment"); Build the project. Result: String Catalog is empty while it should be updated with "test string". I submitted FB12408229 Anyone encountered this? Anyone from Apple can kindly confirm?
Posted
by Yoash.
Last updated
.
Post not yet marked as solved
1 Replies
1.2k Views
Migrating from localizable.strings to string catalog is simple. After migrating the state of 55% are checked okay, 45% are marked with state "new". Why happens this? Reviewing the new strings and marking as "reviewed" would now mean to change each of the 60 "new" marked rows x 4 languages manually - a lot of work. Is there a way to group change the states of all strings?
Posted
by hlmSft.
Last updated
.