Unable to export to apple string catalog file: Custom format endpoint is unreachable

When I export my crowdin project to the new Apple String Catalog file (Seamless Translation of xcstrings Files | Crowdin), it says “Build failed. Apple Strings Catalog Exporter: Files were not exported. Custom format endpoint is unreachable”.

How can I fix this issue?

Hi @fanwg !

We will investigate this with our devs and will come back with updates.

Let’s keep in touch!

It’s been two weeks so far, any updates from your devs?

Hi!
We’ve created the task for the tech team on the matter, the task is still in progress

Hello team !
Just had the same issue. It looks like it happens when trying to deal with plurals. No news on this ?

Hi @gchevillot!

As I can see our developers are still working on the solution.

Sorry for the inconvenience, as soon as we have the updates we’ll let you know!

Meanwhile, thank you for your patience :pray:

I tested some more xcstrings exporter and it seems like it has a couple more issues besides plural :

  • Formatting of locale inside don’t seem to be correct (ex: fr_CA where it should be fr-CA in Apple standards)
  • If a key doesn’t have a translation in a certain language, it currently fills translation with empty string where it should not fill translation for that language at all to allow iOS to use default language

Hope this helps :slight_smile:

Hi @gchevillot,

Thank you a lot for sharing your feedback! We are always working on improvements and the feedback of customers helps us a lot to understand your needs,

As for the first issue. Currently, we are already working on the possibility of adding a language mapping to the .xcstrings file format, so you will be able to customize the language code. (internal task number for support team 42647).

Meanwhile, as a workaround, you can use the the Regex app to replace language codes inside your file from fr_CA to fr_CA.

As for the second issue. Relatively recently (on January 25) we changed a bit the logic of the xcstrings files export and now if the file has untranslated languages on export it will be filled with source strings. With this approach, you would make sure to never have a missing translation but the English fallback for all the keys.

However, you mentioned that in your case on export you see the empty keys? I just did a quick test on my project and the untranslated string was filled with English values. Can you please share more details regarding your case? Like the example of the file and the name of the project where it happened?

Please feel free to correct me if I misunderstood you,

Thank you for this quick answer !

As for the first point, I’m glad there is a customization in the works for the tricky cases, but I also feel like the exporter should by default use same format as %osx_code% (without the .lproj of course ^^) so that we don’t have to list each of our regional languages as exceptions in language mapping :wink:

For the second one, I test on this project : Crowdin. You can see it by downloading “channel 1 iOS string catalog” target bundle. For all untranslated strings, you can see an empty string. For example for recipe_title in en_CA:

    "en_CA": {
      "stringUnit": {
        "state": "needs_review",
        "value": ""
      }
    }

In my opinion, you shouldn’t need to put the “en_CA” key at all. That’s what XCode does if you create a new key but never translate it in some language.

Thank you again for your time !

Hi @gchevillot,

Thank you for the suggestion. Passing it to the team! :slightly_smiling_face:

As for the second issue. I just did a quick test and indeed using the Apple Strings Catalog Exporter the untranslated strings are exported as empty values. I will also pass on to the team that we should improve the exporter as well as it was done with a natively supported file format recently.

Thank you :heart:

1 Like

Hi @gchevillot,

Coming back to you as promised,

Our devs improved the ‘‘Apple Strings Catalog Exporter’’ app and now the untranslated strings are also included on the file export.

Thank you,

Hi @Olena !

Thanks a lot for this update !

The format of language/region seems to match %osx_code% with en-CA for example instead of en_CA which is great news ! Also the error “Unable to export to apple string catalog file: Custom format endpoint is unreachable” seems to be fixed when dealing with plurals which is also great !

The only remaining issue (minor) is the presence of the empty strings in “needs_review” state for untranslated keys. Maybe the fix isn’t deployed yet for this.

Anyway with these fixes we can start using .xcstrings in our project so this is great ! :slight_smile:

Hi @gchevillot,

Great! :slight_smile:

As for the second issue with “needs_review” state. It can be a cache. Can you please add/change the translation in the Editor to each target language and tell me the result? You can for example just add a space or a dot. Changing the translations should reset the cache.

Hi @gchevillot

Just received an update from the development team about the language code improvement for .xscstrings files (the possibility of adding a language mapping) so now you should be able to customize the language code

Hi @Dima, we have a use case where we want to map es-419 to es. But adding language mapping doesn’t seem to have any effect on the exported file. Can you provide more details on how to set up language mapping for .xcstrings files? Thanks.

Hey @totally_not_zhe ,

Language mapping does not change the language codes inside the file. If you want to make changes inside the file you need to use Regex Content Processor app

Hello Crowdin team !

I’m coming back to trying to use catalog and I’m afraid not much has changed since February.

@Olena I just tested it on my sample project and I still have the empty strings where I should have nothing instead

"en-CA": {
  "stringUnit": {
    "state": "needs_review",
    "value": ""
  }
}

Also what are we supposed to do for language mappings ?
@Dima if language mapping is handled, what placeholder is supposed to be used ?
@Roman If we are supposed to use regex content processor, I see two drawbacks :

  • I’m afraid this will slow down our exports as we have multiple big projects
  • It’s way harder to setup. (For now I’m unable to make it work, see screenshot where I try to replace Norwegian which is “no” for crowdin but “nb” for Apple)

Thanks in advance !

Hello @gchevillot,

  1. Can you please let me know on what project you are working on so I can double-check from my side the issue with empty strings? I’ve just a test again in my project and was not able to achieve the same result.

  2. As for the question regarding the language mapping. We are so sorry for confusing you! currently, the language mapping is added only to the native exporter and the bundles don’t have this option yet.

  3. As for the Regex app issue. Checking with the tech team about the error.

UPD about the Regex app. Can you please try to close the app and reload the page? The error message should disappear. It allowed me to save the rule in my test project:

Hi @Olena !

Thank you for your answer.
You’re right about the error on regex app, it seems to work now ^^’
But it doesn’t seem to change anything to the result xcstring when I export my bundle. Can you confirm the regex is correct for a temporary replacement of a proper language mapping ?

You can test it and the empty string issue on this project : Crowdin. I have a bundle called “current iOS string catalog” that exports the .xcstrings

Thank you for your time.

Hi @gchevillot!

I passed your question to our developers. Once there are any updates, we’ll let you know!

1 Like