Hi Rowan,
as for now I can only work on it in substituting .php with .txt :-( with an older version I was able to force the software to open files with a different parser, even if the format was not 100% the same.
So here are the results :-)
Source file (I cut part of it):
************************
<?php /** * @package MediaWiki * @subpackage Language */
if( defined( 'MEDIAWIKI' ) ) {
# # In general you should not make customizations in these language files # directly, but should use the MediaWiki: special namespace to customize # user interface messages through the wiki. # See http://meta.wikipedia.org/wiki/MediaWiki_namespace # # NOTE TO TRANSLATORS: Do not copy this whole file when making translations! # A lot of common constants and a base class with inheritable methods are # defined here, which should not be redefined. See the other LanguageXx.php # files for examples. #
#-------------------------------------------------------------------------- # Language-specific text #--------------------------------------------------------------------------
if($wgMetaNamespace === FALSE) $wgMetaNamespace = str_replace( ' ', '_', $wgSitename );
/* private */ $wgNamespaceNamesEn = array( NS_MEDIA => 'Media', NS_SPECIAL => 'Special', NS_MAIN => '', NS_TALK => 'Talk', NS_USER => 'User', NS_USER_TALK => 'User_talk', **************************************
Target file
**************************************
<?php /** German (Deutsch) * @package MediaWiki * @subpackage Language */
if( defined( 'MEDIAWIKI' ) ) {
# # In general you should not make customizations in these language files # directly, but should use the MediaWiki: special namespace to customize # user interface messages through the wiki. # See http://meta.wikipedia.org/wiki/MediaWiki_namespace # # NOTE TO TRANSLATORS: Do not copy this whole file when making translations! # A lot of common constants and a base class with inheritable methods are # defined here, which should not be redefined. See the other LanguageXx.php # files for examples. #
#-------------------------------------------------------------------------- # Language-specific text #--------------------------------------------------------------------------
if($wgMetaNamespace === FALSE) $wgMetaNamespace = str_replace( ' ', '_', $wgSitename );
/* private */ $wgNamespaceNamesEn = array( NS_MEDIA => 'Media', NS_SPECIAL => 'Spezial', NS_MAIN => '', NS_TALK => 'Diskussion', NS_USER => 'Benutzer', NS_USER_TALK => 'Benutzer_Diskussion', NS_PROJECT => $wgMetaNamespace,
*************************************
resulting TMX file
************************************
- <tmx version="1.1"> <header creationtool="OmegaT" creationtoolversion="1" segtype="paragraph" o-tmf="OmegaT TMX" adminlang="EN-US" srclang="EN-EN" datatype="plaintext"> </header> - <body> - <tu> - <tuv lang="EN-EN"> <seg>/**</seg> </tuv> - <tuv lang="DE-DE"> <seg>/** German (Deutsch)</seg> </tuv> </tu> - <tu> - <tuv lang="EN-EN"> <seg> NS_SPECIAL => 'Special',</seg> </tuv> - <tuv lang="DE-DE"> <seg> NS_SPECIAL => 'Spezial',</seg> </tuv> </tu> - <tu> - <tuv lang="EN-EN"> <seg> NS_TALK => 'Talk',</seg> </tuv> - <tuv lang="DE-DE"> <seg> NS_TALK => 'Diskussion',</seg> </tuv> </tu> - <tu> - <tuv lang="EN-EN"> <seg> NS_USER => 'User',</seg> </tuv> - <tuv lang="DE-DE"> <seg> NS_USER => 'Benutzer',</seg> </tuv> </tu> - <tu> - <tuv lang="EN-EN"> <seg> NS_USER_TALK => 'User_talk',</seg> </tuv> - <tuv lang="DE-DE"> <seg> NS_USER_TALK => 'Benutzer_Diskussion',</seg> </tuv> </tu> </body> </tmx>
**************************************
Now the problem here is the parser in order to exclude the first part of the translation unit and the comments that should not be touched: example:
NS_USER => NS_USER_TALK =>
should not be seen
and these parts should not be seen
# # In general you should not make customizations in these language files # directly, but should use the MediaWiki: special namespace to customize # user interface messages through the wiki. # See http://meta.wikipedia.org/wiki/MediaWiki_namespace
************************************
If we are talking about people who know what they may not touch, the tool can already be used as is. If necessary I can try to create alignment files and store to tmx using DéjàVu - there is also a OpenSource alignment tool, but I never used it up to now since I have that commercial tool as well. Of course: we can try it out.
I hope this helps to understand what I am talking about.
Now considering wikidata/Ultimate Wiktionary: it can be a repository for localization data - it just needs correct attribution (in wiki language: the correct category) - this is not possibile immediately but we are already thinking about this since it is "only" an interface issue between OmegaT and UW (only is in " since I don't know how easy this is - my personal programming experiences date back to basic, turbo pascal 5/6 and dbase III+ and IV and even there only easy stuff ... so it's many years now I did not do anything, but at least I can imagine how things could work).
For the parts above I changed the .php extension to .txt extension, created the project, translated some lines and then exported to target and saved translation memory. It is not difficult but for now only people who know what they may not touch can work on it.
If we have the interface between UW and OmegaT one can also make changes on UW that can then be reflected during the following translation. Or one can add translations directly in UW so more than one person contemporarily can work on the project (proof reading also is easier) and when there's the new version you just recall the tmx you need from UW and have the file translated adding the new segments to the TMX and UW.
I am working with version 1.4.6 beta2 since there seems to be a bug with the matches in the latest version and Maxym is not yet back from holiday - so if someone wants to try the software keep that in mind. If you have questions: you can contact me directly or we can use a wiki (don't know where on the wikimedia projects, please tell me), and of course there's also the OmegaT mailing list (omegat@yahoogroups.com).
Should I add this information somewhere? Where? Meta?
Ciao, Sabine
___________________________________ Yahoo! Messenger: chiamate gratuite in tutto il mondo http://it.beta.messenger.yahoo.com