Bug or feature in tra() ?
- Status
- Pending
- Subject
- Bug or feature in tra() ?
- Version
- 25.x
- Category
- Bug
- Consistency
- Less than 30-minutes fix
- Support request
- Feature
- Admin Interface (UI)
- Resolution status
- Fixed or Solved
- Submitted by
- hman
- Lastmod by
- Nat Okpe
- Rating
- Description
Is it a bug or a feature, that truncates the output of strings after a pipe symbol?
Example to illustrate: /lib/prefs/feature, line 2425:Copy to clipboard'feature_wiki_argvariable' => [ 'name' => tra('Wiki argument variables'), 'description' => tra('Allow writing request variables in wiki content using {{paramname}} or {{paramname|default}} - special case {{page}} {{user}}'), 'type' => 'flag', 'help' => 'Advanced+Wiki+Syntax+usage+examples', 'default' => 'n', 'keywords' => 'arg var vars', ],
The output of this descriptions stops at the pipe symbol between paramname and default, supposedly in all languages, including English. I cannot translate into German with this entry in custom.php:Copy to clipboard"Allow writing request variables in wiki content using {{paramname}} or {{paramname|default}} - special case {{page}} {{user}}" => "Argumentvariablen innerhalb von Wiki-Inhalten mit {{paramname}} oder {{paramname|standard}} erlauben - Sonderfall {{page}} {{user}}",but when I replace the pipe with a slash, all is well:
Copy to clipboard"Allow writing request variables in wiki content using {{paramname}} or {{paramname|default}} - special case {{page}} {{user}}" => "Argumentvariablen innerhalb von Wiki-Inhalten mit {{paramname}} oder {{paramname/standard}} erlauben - Sonderfall {{page}} {{user}}",So please check whether this is a bug or a feature of tra(), and depending on this check either fix it or change in English this description, to use text without a pipe.
Side remark: The pipe doesn't show here, just as the the arguments in double curly braces! Although I enclosed my code sample in CODE tags! ( Arguments are interpreted first before anything else. That's what ~np~nonparsed~/np~ is for)
- Importance
- 4
- Easy to solve?
- 10 easy
- Priority
- 40
- Demonstrate Bug on Tiki 19+
-
This bug has been demonstrated on show2.tiki.org
Please demonstrate your bug on show2.tiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show2.tiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Demonstrate Bug (older Tiki versions)
-
This bug has been demonstrated on show.tikiwiki.org
Please demonstrate your bug on show.tikiwiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show.tikiwiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Ticket ID
- 7469
- Created
- Thursday 06 August, 2020 13:49:41 UTC
by hman - LastModif
- Wednesday 27 April, 2022 12:19:08 UTC