Loading...
 

Translations Revamp

Page to collect plans for a translation revamp, to be discussed at TikiFest Virtual 2021.
These changes have potential for breaking things before things get better so they need to be introduced before we branch Tiki 23. This way, they can be tested and improved on a normal release and all should be great for our next LTS version: Tiki24 LTS.

Aims

Add context to translatable strings

As discussed on the dev list here
Status: @Jyhem is working on it on https://gitlab.com/jyhem/tiki-translations-revamp. Working solution in master: https://gitlab.com/tikiwiki/tiki/-/commit/67cbcb7ad2080c077bcd25771b7389b4243ba496. Please review/comment.

Testing procedure

Insert a new string or modify an existing string in the source or a template with context like this: "Edit_C(title)". Then rebuild the language files.

Rebuilding language files
php console.php  translation:englishupdate --scm=git
php console.php  translation:getstrings
php console.php c:c


Current plan is to add an underscore with upper "C" (as in context) and parentheses wrapped string to indicate context, e.g.:

lang/en/language.php
"edit_C(verb)" => "edit",
"edit_C(noun)" => "edit",
"D_C(abbrev-day)" => "D",
"M_C(abbrev-month)" => "M",
"Location_C(map)" => "Location",
"Rent_C(verb)" => "Rent",
lang/fr/language.php
"edit_C(verb)" => "modifier",
"edit_C(noun)" => "modification",
"D_C(abbrev-day)" => "J",
"M_C(abbrev-month)" => "M",
"Location_C(map)" => "Lieu",
"Rent_C(verb)" => "Location",


Another suggestion how to approach it (put a c: prefix - - as in context: — in the parenthesis):

lang/en/language.php
// "edit_(c: verb)" => "edit",
// "edit_(c: noun)" => "edit",
// "D_(c: abbrev-day)" => "D",
// "M_(: abbrev-month)" => "M",
// "Location_(c: map)" => "Location",
// "Rent_(c: verb)" => "Rent",
lang/fr/language.php
"edit_(c: verb)" => "modifier",
"edit_(c: noun)" => "modification",
"D_(c: abbrev-day)" => "J",
// "M_(c: abbrev-month)" => "M",
"Location_(c: map)" => "Lieu",
"Rent_(c: verb)" => "Location",

Is there a benefit to the second suggestion compared to the first? Or is there an issue with the first which the second addresses? It just seems like a more wordy way of getting the exact same benefits with more possibilities for typos. As illustrated in how there is a typo on the example « // "M_(: abbrev-month)" => "M", »

Make the Smarty block work for RTL Languages

Status: Is any volunteer working on this?
Apparently using numbers as the parameters in smarty causes trouble in right to left languages, e.g.

Currently
{tr _0=$report_site _1=$report_user}Report on %0 for %1{/tr}
Fixed
{tr a=$report_site b=$report_user}Report on %0 for %1{/tr}
Or even
{tr $report_site $report_user}Report on %0 for %1{/tr}

I understand the Or even proposal but I am confused by the Fixed proposal. Did you mean {tr a=$report_site b=$report_user}Report on %a for %b{/tr} ?

Add JavaScript Translation Collecting to the Get Strings Command

Adapt php console.php translation:getstrings to populate all the missing tr() to the language.js files.
Status: Is any volunteer working on this?
How are the language.js files currently created and maintained?

Get rid of the special handling of punctuation

Status: Maybe @Jyhem can have a look after the Add context to translatable strings part is working before the TikiFest (no promises).

As was discussed numerous times in TikiFests, the idea of automating the handling of punctuation has more drawbacks than benefits. Plus, it's one more confusing Tiki-specific thing to learn for translators.

The explanation comment in lang/*/language.php
/* Note for translators about translation of text ending with punctuation
 *
 * The current list of concerned punctuation can be found in 'lib/init/tra.php'
 * On 2009-03-02, it is: (':', '!', ';', '.', ',', '?')
 * For clarity, we explain here only for colons: ':' but it is the same for the rest
 *
 * Short version: it is not a problem that string "Login:" has no translation. Only "Login" needs to be translated.
 *
 * Technical justification:
 * If a string ending with colon needs translating (like "{tr}Login:{/tr}")
 * then Tiki tries to translate 'Login' and ':' separately.
 * This allows to have only one translation for "{tr}Login{/tr}" and "{tr}Login:{/tr}"
 * and it still allows to translate ":" as " :" for languages that
 * need it (like French)
 * Note: the difference is invisible but " :" has an UTF-8 non-breaking-space, not a regular space, but the UTF-8 equivalent of the HTML  .
 * This allows correctly displaying emails and JavaScript messages, not only web pages as would happen with  .
 */

Keywords

The following is a list of keywords that should serve as hubs for navigation within the Tiki development and should correspond to documentation keywords.

Each feature in Tiki has a wiki page which regroups all the bugs, requests for enhancements, etc. It is somewhat a form of wiki-based project management. You can also express your interest in a feature by adding it to your profile. You can also try out the Dynamic filter.

Accessibility (WAI & 508)
Accounting
Administration
Ajax
Articles & Submissions
Backlinks
Banner
Batch
BigBlueButton audio/video/chat/screensharing
Blog
Bookmark
Browser Compatibility
Calendar
Category
Chat
Comment
Communication Center
Consistency
Contacts Address book
Contact us
Content template
Contribution
Cookie
Copyright
Credits
Custom Home (and Group Home Page)
Database MySQL - MyISAM
Database MySQL - InnoDB
Date and Time
Debugger Console
Diagram
Directory (of hyperlinks)
Documentation link from Tiki to doc.tiki.org (Help System)
Docs
DogFood
Draw -superseded by Diagram
Dynamic Content
Preferences
Dynamic Variable
External Authentication
FAQ
Featured links
Feeds (RSS)
File Gallery
Forum
Friendship Network (Community)
Gantt
Group
Groupmail
Help
History
Hotword
HTML Page
i18n (Multilingual, l10n, Babelfish)
Image Gallery
Import-Export
Install
Integrator
Interoperability
Inter-User Messages
InterTiki
jQuery
Kaltura video management
Karma
Live Support
Logs (system & action)
Lost edit protection
Mail-in
Map
Menu
Meta Tag
Missing features
Visual Mapping
Mobile
Mods
Modules
MultiTiki
MyTiki
Newsletter
Notepad
OS independence (Non-Linux, Windows/IIS, Mac, BSD)
Organic Groups (Self-managed Teams)
Packages
Payment
PDF
Performance Speed / Load / Compression / Cache
Permission
Poll
Profiles
Quiz
Rating
Realname
Report
Revision Approval
Scheduler
Score
Search engine optimization (SEO)
Search
Security
Semantic links
Share
Shopping Cart
Shoutbox
Site Identity
Slideshow
Smarty Template
Social Networking
Spam protection (Anti-bot CATPCHA)
Spellcheck
Spreadsheet
Staging and Approval
Stats
Survey
Syntax Highlighter (Codemirror)
Tablesorter
Tags
Task
Tell a Friend
Terms and Conditions
Theme
TikiTests
Timesheet
Token Access
Toolbar (Quicktags)
Tours
Trackers
TRIM
User Administration
User Files
User Menu
Watch
Webmail and Groupmail
WebServices
Wiki History, page rename, etc
Wiki plugins extends basic syntax
Wiki syntax text area, parser, etc
Wiki structure (book and table of content)
Workspace and perspectives
WYSIWTSN
WYSIWYCA
WYSIWYG
XMLRPC
XMPP




Useful Tools