Loading...
 

Language Custom and all language files system holding - Proposal [MOD] [ADD]

Status
Open
Subject
Language Custom and all language files system holding - Proposal [MOD] [ADD]
Version
7.x
Category
  • Feature request
Feature
i18n (Multilingual, l10n, Babelfish)
Submitted by
Bernard TREMBLAY
Volunteered to solve
Bernard TREMBLAY
Lastmod by
Bernard TREMBLAY
Rating
(0)
Description

Language Custom and all language files system holding - Proposal MOD ADD for Trunk 7x

Hi,

I was looking to tra.php and the way to hold the custom languages complements.

Note :
I note the recent change from array_merge($lang, $custom_lang) to $lang+$custom_lang which forbid custom to overload elements of system language using same English keys, the instruction which "merge" the two languages part into $lang staying into custom.php.

My proposal

To be clearer and for a best security and portability and capability of extensions. I propose (written ready to commit), which is described below, the details are :

FROM NOW :

System language file name(s)

System language has a file named "system_language.php" or "language.php" for backward compatibility (allowed multiple see above)

custom language files names "pattern"

Custom language has file named custom_language.php or custom.php for backward compatibility. (Others can be used see above)

Allow multiple files language with a pattern for names

Others file for language can be hold if their name is patterned <type>_language.php. <type> is allowed ref #a-z0-9_# compatible with php var names.

Names of arrays $lang

The "$lang" variables (arrays) defined by these files are of pattern "$lang_<type>"

Fusion of files

The concatenation (fusion) is now out of these files (custom) and become an element of the function "init_language" which must have this role, role which is then enhanced by the check of the contents and the real build of a $lang
A future option will allow when the routine are used to build or update new language files the "merge_array".

Role of init_language

So, the function "init_language" does the following :

  1. check for language files (scandir) into language dir with valid patterns
  2. tries to read (include) each file, if failed to include it is an held exception (for the moment just skip, later send system error with a comment) but not syntax error in language files which can crash)
  3. checks the isset of arrays (corresponding to files names by pattern)
  4. will checks the content (available chain key and chain values) php syntax validation on prefs
  5. adds the arrays into $lang (fusion "+" not merge only on option)

the benefits

  • This allows that tra (init_language) can check what is done and the content of $lang files and arrays generated.
  • This allows to check at the $lang_* file definition load (check+include).
  • This allows multiple files when need, particularly test phases.(split the files by nature of texts)
  • This solves for the future the ability to introduce with backward compatibility "tikityped" strings to accept or not html tagged chains or others markup depending of the use of the strings (the typical sample is the strings of the name, descriptions, help, labels, warning, option in prefs definitions) but too the user fields content validation (can crash smarty and/or send a blank screen).
  • May be it can be decided to associate a type of string depending of the syntax (the language array should have two value for each main key the string and the type).
  • I have a separate proposal to define with backward compatibility the <type> of strings into the $lang arrays.

purpose

  • This is done to make the languages files building and checking easier and have a better reliability in the phase of development of specific applications or when changes are necessary during exploitation.
  • this allows to develop (I will) a function to run the same init routines with a request merge_files to generate an upgrade of file languages from more little files with changes todo.
  • this allows lighter files and separate translated parts from the others etc.

What have been done

  • I had just to add some lines (without specific checks for now) only managing the good load of a language file and their name pattern, no still enhancement in checking the contents of strings which needs typed strings.
  • Tests
  • no actually change to $tikidomains, can be enhanced


Ready to submit.
What's your opinion ? Do I commit ?

Importance
8
Priority
40
Demonstrate Bug (Tiki 19+)
Please demonstrate your bug on show2.tiki.org
 About show2.tiki.org

To help developers solve the bug, we kindly request that you demonstrate your bug on a show2.tiki.org instance. To start, simply select a version and click on "Create show2.tiki.org instance". Once the instance is ready (in a minute or two), as indicated in the status window below, you can then access that instance, login (the initial admin username/password is "admin") and configure the Tiki to demonstrate your bug. Priority will be given to bugs that have been demonstrated on show2.tiki.org.

Version: Create show2.tiki.org instance
Demonstrate Bug (older Tiki versions)
Please demonstrate your bug on show.tikiwiki.org
 About show.tikiwiki.org

To help developers solve the bug, we kindly request that you demonstrate your bug on a show.tikiwiki.org instance. To start, simply select a version and click on "Create show.tikiwiki.org instance". Once the instance is ready (in a minute or two), as indicated in the status window below, you can then access that instance, login (the initial admin username/password is "admin") and configure the Tiki to demonstrate your bug. Priority will be given to bugs that have been demonstrated on show.tikiwiki.org.

Version: Create show.tikiwiki.org instance
Ticket ID
3757
Created
Monday 24 January, 2011 23:06:58 GMT-0000
by Bernard TREMBLAY
LastModif
Tuesday 25 January, 2011 00:49:10 GMT-0000

Attachments

 filenamecreatedhitscommentversionfiletype 
No attachments for this item


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
Kanban
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
Federated Timesheets
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