Fullscreen
Loading...
 
Skip to main content

Console, translation:getstrings argument basedir not working outside a Tiki (documentation missing ?)

Status
Open
Subject
Console, translation:getstrings argument basedir not working outside a Tiki (documentation missing ?)
Version
21.x
Category
  • Documentation (or Advocacy)
  • Easy for Newbie Dev
  • Feature request
Feature
Console / Command Line
i18n (Multilingual, l10n, Babelfish)
Resolution status
New
Submitted by
Bernard Sfez / Tiki Specialist
Lastmod by
Bernard Sfez / Tiki Specialist
Rating
(0)
Description

In the console.php translation:getstrings it is possible to use the "basedir" argument to set the directory from where you want to get the string (or so it seems). However you can only use it inside a Tiki root directory or at least a directory that contain a /lang/yourtargetlanguage directory. (ie: lang/en/)

See: lib/language/GetStrings.php

Line 171
if (! file_exists($this->baseDir . '/lang/' . $lang)) {


Else it throw an error "Invalid language code."

There should be a better documentation for this or a mechanism to ask if the user want to create the "missing" directory in the basedir.
(use case: getting strings of smarty template in themes/templates or inside a specific theme: themes/Bernard/templates)

Importance
5
Easy to solve?
5
Priority
25
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
7357
Created
Thursday 07 May, 2020 13:19:10 UTC
by Bernard Sfez / Tiki Specialist
LastModif
Thursday 07 May, 2020 13:19:10 UTC


Show PHP error messages