Bug 256612 - Scripts are not translatable
Summary: Scripts are not translatable
Status: CONFIRMED
Alias: None
Product: konversation
Classification: Applications
Component: general (show other bugs)
Version: 1.5-rc1
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Konversation Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-11 15:53 UTC by Felix Schweighofer
Modified: 2013-04-15 02:00 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Schweighofer 2010-11-11 15:53:18 UTC
Version:           1.3.1 (using KDE 4.5.3) 
OS:                Linux

The scripts that can be run using the "/exec" command in konversation are not translatable. For example, the command "/exec gauge 20" prints "Beer load [    \                ] 20%" although I've set the language to German. Even the "media" script produces only English output.

Looking into the code of the scripts, they obviously are not translatable.

It would be very nice to have localized versions of these scripts.

Reproducible: Always

Steps to Reproduce:
Enter for example one of the following commands in the input line of konversation:
"/exec gauge 20"
"/exec uptime"
"/exec media"
...

Actual Results:  
All output is in English.

Expected Results:  
The output should be locale/language specific.
Comment 1 Eike Hein 2011-05-25 12:31:08 UTC
This has been partially addressed now, for Python scripts. Python scripts can import an i18n module from a konversation package that makes the usual i18n/i18nc/i18np/i18ncp calls available. The two bundled Python scripts, cmd and media, have been converted and scripty has been extracting their strings for a while now.

We're considering porting the rest of the bundled scripts to Python as well, but the downside of that is that it would mean stopping to ship scripting examples in a variety of language. We would have to find some other way to make up for that. We're not considering implementing i18n support for other scripting languages at this time due to the maintenance cost.

For the completeness, here are the relevant changelog entries:

* Scripts executed by Konversation can now access Konversation's current UI
  locale in the KONVERSATION_LANG environment variable.
* Konversation now installs an experimental Python scripting support package
  named 'konversation' into a subdirectory of its application data directory
  and appends all 'konversation/scripting_support/python' directories found
  in any KDE application data resource directories (i.e. within $KDEHOME,
  $KDEDIRS, etc.) to the PYTHONPATH environment variable available in the
  script execution context, thereby allowing Python scripts executed by
  Konversation to import the package. The package currently sports modules
  providing APIs for i18n support and D-Bus communication with Konversation.
* User-facing information and error message strings in the bundled 'cmd' and
  'media' scripts now finally enjoy translation support, making use of the
  experimental new Python scripting support package described above.

As mentioned this new Python API is currently still considered experimental with regard to third-party scripts.