Language array: how to change the key-value coding style?

Iā€™m not a coder so Iā€™m asking for your guidance on how to do it.
I will make the required changes if its just requires editing the language files!

As you know SuiteCRm language files do not have a single pattern for all files. Some files use only one type of strings but there are others with different types mixed.
This cause issues using online tools to translate (as Transifex), as some styles do not parse when mixed.

So, is there a simple way to make this language array:


$app_list_strings['case_status_dom'] =
  array (
      'Open_New' => 'New',
      'Open_Assigned' => 'Assigned',
      'Closed_Closed' => 'Closed',
      'Open_Pending Input' => 'Pending Input',
      'Closed_Rejected' => 'Rejected',
      'Closed_Duplicate' => 'Duplicate',
  );

coded like this type of string (one line for each key/value)

$app_list_strings['case_status_default_key'] = 'Open_New';

Note: making strings with 2 keys in the same line is not ok for me (Transifex issues also!)
$app_list_strings[ā€˜moduleListā€™][ā€˜AOP_Case_Updatesā€™] = ā€˜Case Updatesā€™;

(it it useful, I took strings from the \custom\Extension\application\Ext\Language\en_us.AdvancedOpenPortal.php )

To make it more clear: Transifex do not recognize values in a multidimensional array and ignores those lines.
It works fine with PHP arrays and PHP Alternative arrays but they canā€™t be mixed in the same file!

A- Multidimensional arrays: Values are not recognized by Transifex to be translated. (ate least Transifex do not change those lines either). Example:

app_list_strings['relationship_type_list']['SS'] = 'Start to Start';

B- PHP Array = works fine. Example:

$app_list_strings['case_state_dom'] =
  array (
      'Open' => 'Open',
      'Closed' => 'Closed',
  );

C- Alternative PHP array (One Dimensional) = works fine. Example:

$app_list_strings['case_state_default_key'] = 'Open';

Note:
B an C arrays type canā€™t be mixed in the same file (only one type is identified as values to be translated.

Any ideas on how to solve?

This sounds like a limitation with the translation tool.

You would have to change the way all arrays are handled in SuiteCRM if you wish it to work in the way you detailed.

Thanks,

Will.

The type A (multimdimensional) is a limitation of the Transifex tool.
I will ask Transifex to support it (other software has already make similar requests but not attended yet)

What about the limitation on mixed arrays in same file (B and C examples):
Is there a way to avoid that in SuiteCRm language files?
You know: this only happens in less then 20 files, so probably this is not a required way to work on all SuiteCRM languages, but allowed as an option for developers.

On the other side:
Transifex can create a new ā€œtypeā€ of files for a given software but they require a set of rules for that type.
Example: they allow INI files AND INI Joomla files.
See: Supported File Formats http://docs.transifex.com/developer/formats/

Can you provide some resource/rules so I can send to them?
Can we have a set of rules/recommendation on creating language files.
This would be important, not only for your in house developers but also for all other users that will develop their own modules/Plugins with language files.

That would also prevent that a file that works with Transifex now will not be broken after some future update??

Related info:
The Firefox way to use Transifex:
https://developer.mozilla.org/en-US/Apps/Build/Localization/App_Localization_with_Transifex