String extraction for Transifex cannot handle linebreaks and tabs
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 36.9k
- Forks
- 5.2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 713
Description
With https://github.com/nextcloud/tasks/pull/1124 we put another argument in the argument list of the Nextcloud translate function t and we made the code better readable by inserting line breaks like so:
Before:
check.msg = this.$t('tasks', 'The name "{calendar}" is already used.', { calendar: name })
After:
check.msg = this.$t(
'tasks',
'The name "{calendar}" is already used.',
{ calendar: name },
undefined,
{ sanitize: false, escape: false }
)
After merging the pull request, all strings to translate from the lines affected by this change were removed from Transifex, see https://github.com/nextcloud/tasks/commit/bfc245fa2052a03ddc5a168d87f2682f69b1e948. I haven't figured out what cause the issue, if it is the linebreak of the other argument.
I don't really know who to ask to check whether the string extraction from Transifex works correctly and can handle linebreaks, so I am gonna ping @ChristophWurst, since you worked on the translation in https://github.com/nextcloud/server/pull/20976 🙈
I will check whether removing the linebreaks might solve the issue.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Compare the translation calls changed by tasks PR 1124 with the extraction result removed in commit bfc245fa2052a03ddc5a168d87f2682f69b1e948. Start by locating the server-side Transifex extraction configuration or entry point and test how multiline calls and tab-indented arguments are parsed. Done means affected strings are extracted and retained correctly after the change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- localization, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100