mirego / accent

The first developer-oriented translation tool. True asynchronous flow between translators and your team.
https://www.accent.reviews
BSD 3-Clause "New" or "Revised" License
1.29k stars 97 forks source link

cli path resolve bug? #383

Closed molind closed 9 months ago

molind commented 1 year ago
{
    "apiUrl": "...",
    "apiKey":"...",
    "files": [
      {
        "format": "strings",
        "source": "Resources/Languages/en.lproj/Localizable.strings",
        "target": "Resources/Languages/%slug%.lproj/%document_path%.strings"
      }
    ]
  }

When I try to sync that file it writes to Resources/Languages/en.lproj/en.lproj.strings looks like it overwrites somewhere document_path with value from slug.

simonprev commented 1 year ago

I think we don’t support "dots" in the folder name like en.lproj

molind commented 1 year ago

Is there a way to use it with iOS project? Escape dots somehow?

molind commented 11 months ago

Any news on this? It's part of readme for cli. It says that it's supported and should work, but it doesn't. :) Sounds like a bug for me.

      "namePattern": "file",
      "format": "strings",
      "source": "Resources/Languages/en.lproj/Localisable.strings",
      "target": "Resources/Languages/%slug%.lproj/%document_path%.strings"

checked on accent-cli/0.14.2 today.

upd. First time I synced and it created en.lproj.strings. I deleted it on server and synced again. After second sync no new files was created on server.

simonprev commented 9 months ago

I just added a working example for this exact config in the cli folder. I tested it locally and everything synced (with a small missing log error that I also fixed in master)