The string format in the exported JSON file is incorrect

I added some new strings to the project. When the content is relatively short, there are no issues. However, when the strings are longer, problems generally arise.

For example, I added the following string through Crowdin’s UI in the project.

This action will permanently delete: {openList}{openListItem}Watch State & Ratings previously synced to Plex from a Personal Media Server.{closeListItem}{openListItem}Watch State & Ratings for Plex’s On Demand catalog or Discover.{closeListItem}{closeList}

However, when I downloaded the translated file, it turned into the following:

  "This action will permanently delete: {openList}{openListItem}Watch State & Ratings previously synced to Plex from a Personal Media Server": {
    "{closeListItem}{openListItem}Watch State & Ratings for Plex’s On Demand catalog or Discover": {
      "{closeListItem}{closeList}": "此操作将永久删除以下内容:{openList}{openListItem}从个人媒体服务器同步到 Plex 的观看状态和评分。{closeListItem}{openListItem}Plex 点播服务或发现中的观看状态和评分。{closeListItem}{closeList}"

And the correct format should be:

  "This action will permanently delete: {openList}{openListItem}Watch State & Ratings previously synced to Plex from a Personal Media Server.{closeListItem}{openListItem}Watch State & Ratings for Plex’s On Demand catalog or Discover.{closeListItem}{closeList}": "此操作将永久删除以下内容:{openList}{openListItem}从个人媒体服务器同步到 Plex 的观看状态和评分。{closeListItem}{openListItem}Plex 点播服务或发现中的观看状态和评分。{closeListItem}{closeList}"

From the screenshot, it’s clear that this situation occurs frequently. I would like to know how to resolve this issue. Did I make any mistakes in my operations?

Hello @x1ao4

Depending on the file format, the system can recognize one or another symbol as an inline separator that splits the content.

Have you tried changing content segmentation before processing the files?

Based on my observations, the issue lies with the “.”, which is being treated as a delimiter, causing format errors. I tried to add rules myself to avoid treating “.” as a delimiter, but I don’t understand the rules and don’t know how to define them. I attempted to use AI for assistance, and it suggested the following rules, but they had no effect. Can you help me?

<?xml version="1.0" encoding="UTF-8"?>
<srx version="2.0"
     xmlns="http://www.lisa.org/srx20"
     xsi:schemaLocation="http://www.lisa.org/srx20 srx20.xsd"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <header segmentsubflows="yes" cascade="yes">
    <formathandle type="start" include="no"/>
    <formathandle type="end" include="yes"/>
    <formathandle type="isolated" include="yes"/>
  </header>
  <body>
    <languagerules>
      <languagerule languagerulename="Default">
        <!-- 确保句号不会导致分段 -->
        <rule break="no">
          <beforebreak>\.</beforebreak>
          <afterbreak></afterbreak>
        </rule>
      </languagerule>
    </languagerules>
    <maprules>
      <!-- 应用默认规则 -->
      <languagemap languagepattern=".*" languagerulename="Default"/>
    </maprules>
  </body>
</srx>

My original file is in JSON format, for example:

{
  "\"Automatically adjust quality\" will be disabled for these videos.": "\"Automatically adjust quality\" will be disabled for these videos.",
  "\"{directoryTitle}\" is currently being updated": "\"{directoryTitle}\" is currently being updated",
  "\"{directoryTitle}\" is empty": "\"{directoryTitle}\" is empty",
  "\"{playerName}\" is playing media from an unknown source.": "\"{playerName}\" is playing media from an unknown source.",
  "({count} Channels)": "({count} Channels)",
  "+ {count} more": "+ {count} more",
  "...plus more exclusive features!": "...plus more exclusive features!",
  "0 Channels (scan required)": "0 Channels (scan required)",
  "0 files": "0 files",
  "1 Album": "1 Album",
  "1 Episode": "1 Episode",
  "1 Item": "1 Item",
  "1 Movie": "1 Movie",
  "1 Second": "1 Second",
  "1 Show": "1 Show",
  "1 Track": "1 Track",
  "1 Video": "1 Video"
}

I believe the issue I mentioned on The new strings are being automatically merged is also related to the “.”, and they might be the same problem.

Hello @x1ao4

Thanks for the details, we really appreciate it. I need to check this with our development team.

We will update you once we have some news on the matter :slight_smile:

Hi @x1ao4 ! do you export translations via bundles? or just regular export?

Your colleague solved my problem because the strings that were causing issues contained a period (‘.’). I just need to add quotation marks before and after these strings in the Identifier (Key) and Context, and the formatting will no longer be an issue.