[Localization] Some strings are hardcoded to English

Hi

I noticed the translation has some hardcoded english texts, e.g. the “never” in the display when a gateway has logged in.

This should change it:

file: gateway-registrations.jsp

old:

res.lastLogin = ((lastLogin != null) ? lastLogin.toString() : "<i>never</i>");
          [...]
          <td><%= result.lastLogin %></td>

new:

res.lastLogin = ((lastLogin != null) ? lastLogin.toString() : null);
          [...]
          <% if (result.lastLogin!=null ){ %>
               <td><%= result.lastLogin %></td>
          <%}else{ %>
               <td><fmt:message key="global.never"></fmt:message></td>
          <% } %>

The ressource-key “global.never” has to be added to the propertyfile

global.never=noch nie

I also noticed the translation is a little bit buggy, because it depends on the machine Openfire is running on. I have my openfire running with German locales but English setup.

The result? Openfire runs on English (all setupdialogs are English), but the setupdialogs of the gatewayplugin are German

I don’'t know why, the places I found translations, everything looks fine.

Greets

WarEagle

gateway-registrations.jsp

old:

<span><fmt:message key="per page"></fmt:message></span>
                [...]
          <strong>Page:</strong>

new:

<span><fmt:message key="global.perpage"></fmt:message></span>
                [...]
          <strong><fmt:message key="global.page"></fmt:message>:</strong>
English:
global.perpage=per page
global.page=Page
German:
global.perpage=pro Seite
global.page=Seite

I just took care of all these translations that you mention, thanks! (added your german translations as well)

I don’‘t really see what you mean by not all of it being translated. I switched to german and just about everything was translated to german except for the Media Proxy stuff (openfire itself doesn’‘t have a german translation of that) and the various entries down the left side ‘‘toolbar’’. They aren’‘t translated because I don’‘t have updated translations for them. =) Perhaps you’'ve be willing to translate?

gateway.name=IM Gateway

gateway.description=Provides gateway connectivity to the other public instant messaging networks

gateway.gateways=Gateways

gateway.gateways.desc=Gateway setup

gateway.settings=Settings

gateway.settings.desc=Click to manage the service that provides access to other IM networks

gateway.registrations=Registrations

gateway.registrations.desc=Click to view and manage the user registrations to other IM networks

I saw thinks like this one in gateways.js:

function toggleAdd(theID)           [...]
          $(jiveAddRegLink).innerHTML = "Add a new registration";
          [...]

Thinks like this are spread over the code. If you like I could make you a list of what I find.

But: Translation isn’'t anything of importance!

And about the not translated properties:

gateway.name=IM Gateway
     gateway.description=Stellt ein gateway bereit welches Verbindungen zu anderen bekannten IM-Netzwerken erlaubt.
     gateway.gateways=Gateways
     gateway.gateways.desc=Gateway Einstellungen
     gateway.settings=Einstellungen
     gateway.settings.desc=Hier klicken, um die Dienste die Zugang zu anderen IM-Netzwerken bieten, zu verwalten.
     gateway.registrations=Registrierungen
     gateway.registrations.desc=Hier klicken, um die Registrierungen zu anderen IM-Netzwerken zu betrachten oder zu verwalten.

I’'ll take care of adding these updates in a bit (thanks!) but yes, any untranslated strings in the code you find, please send them my way!