Bug 144189 - Need tool to help check for missing translations
Need tool to help check for missing translations
Status: CLOSED WONTFIX
Product: Red Hat Network
Classification: Red Hat
Component: RHN/R&D (Show other bugs)
RHN Devel
All Linux
medium Severity medium
: ---
: ---
Assigned To: Mike McCune
Red Hat Satellite QA List
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-01-04 17:37 EST by Mike McCune
Modified: 2008-10-17 14:08 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-10-17 14:08:36 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Mike McCune 2005-01-04 17:37:04 EST
We need a tool to create a dummy version of the l10n files in a test
language like pig latin or something.

This will allow us to 

Another possibility is to have a config item that puts the
LocalizationService into 'test' mode where it places a distinguishable
token around all the strings it knows how to translate, something like:


"The quick brown fox jumped over the lazy dog"

would be returned as:

"%%%The quick brown fox jumped over the lazy dog%%%" 

so a visual check would show all the strings that weren't within the
%%% as being untranslated (from DB, not wrapped in a call to the
service, etc...).
Comment 1 Mike McCune 2005-01-04 17:37:39 EST
I meant to say above:  

This will allow us to visually inspect the website to search for
missing translations.
Comment 2 Mike McCune 2005-01-19 18:23:59 EST
I added a bit of code to the LocalizationService that wraps the
messages in a marker if a specific debug flag is set in the config file:

public String getMessage(String messageId, Locale locale, Object[] args) {
....

        // If we have put the Service into debug mode we
        // will wrap all the messages in a marker.
        if (Boolean.valueOf(
            Config.get().getString("web.l10n_debug")).
                booleanValue()) {
            StringBuffer debug = new StringBuffer();
            String marker =
                Config.get().getString("web.l10n_debug_marker");
            debug.append(marker);
            debug.append(mess);
            debug.append(marker);
            mess = debug.toString();
        }
        return mess;
}

I turned it on and immediately noticed that "Logged In :" text on the
main page wasn't wrapped in the marker.  It provides an easy way to
check on a page (or the entire site in general) what has been
localized and what hasn't.

I'm assuming its OK for me to checkin this modification to the
rhn_web.conf file into CVS?  Should I put a better guard around that
Boolean.valueOf() call in case that config value doesn't exist?

Mike
Comment 3 Amy Owens 2008-10-17 14:08:36 EDT
This bug has been closed due to inactivity.  Please open a new bug with specific details if this problem is still occurring or if an enhancement is needed.

Note You need to log in before you can comment on or make changes to this bug.