localization formats proposal


Subject: localization formats proposal
From: Rui Miguel Seabra (rms@greymalkin.yi.org)
Date: Sun Jul 08 2001 - 10:07:10 CDT


Hello,

  I've been talking in irc with hipitrail (from Australia), and I've reached to the following proposal.

  Notice I am using _ for choosing the shortcut character in the menus, since we should remove as much clutter as possible, and & doesn't look bright, and using a simple & would break xml standards.
  NULLs are substituted by the lack of that item (but it's still represented in this mail for clarity, under an xml comment).

Original file:

<AbiLocale app="AbiWord" ver="1.0" language="en-US" fallback="true" enc="iso=8859-1">
 <strings>
  <string id="DLG_Apply">Apply</string>
  <string id="DLG_Break_Insert">Insert Break</string>
 </strings>

<!-- I'm not sure about menus and toolbars.. here's a shot... -->

 <tb id="AP_TOOLBAR_ID_FILE_NEW" value="New">
  <icon>tb_new.xpm</icon>
  <!-- this is not needed here since it's empty: <tooltip></tooltip> -->
  <status>Create a new document</status>
 </tb>

 <menu id="AP_MENU_ID_FILE">
  <label>_File</label>
  <!-- this is not needed here since it's empty: <status></status> -->
 </menu>

 <menu id="AP_MENU_ID_FILE_NEW">
  <label>_New</label>
  <status>Create a new document</status>
 </menu>

</AbiLocale>

and in pt-PT.strings:

<AbiLocale app="AbiWord" ver="1.0" language="pt-PT" enc="iso=8859-1">
 <strings>
  <string id="DLG_Apply">Aplicar</string>
  <string id="DLG_Break_Insert">Inserir Quebra</string>
 </strings>

<!-- I'm not sure about menus and toolbars.. here's a shot... -->

 <tb id="AP_TOOLBAR_ID_FILE_NEW" value="Novo">
  <icon>tb_new.xpm</icon>
  <!-- this is not needed here since it's empty: <tooltip></tooltip> -->
  <status>Criar um novo documento</status>
 </tb>

 <menu id="AP_MENU_ID_FILE">
  <label>_Ficheiro</label>
  <!-- this is not needed here since it's empty: <status></status> -->
 </menu>

 <menu id="AP_MENU_ID_FILE_NEW">
  <label>_Novo</label>
  <status>Criar um novo documento</status>
 </menu>

</AbiLocale>

This would make life easier for translations, and we'd have a fairly small dtd for the .strings files, which is a Good Thing for them to be edited with an xml editor, for instance, and requires no further change to its dtd.

On the developers side, this would mean a slightly slower startup of abiword, but since menus and toolbars won't be builtin anymore (THEY ALL ARE), the startup time might be balanced, AND they don't even require parsing of the strings file if abi is used in batch mode.

Another thing that might help coding it this way, is if expat has a DOM compatible api (I do not know if it has).

Opinions anyone?

PS: I still think gettext is way better, but then... there are arguments which are somewhat valid for not using it, thus I suggested this.




This archive was generated by hypermail 2b25 : Sun Jul 08 2001 - 11:00:15 CDT