Bug 144189 - Need tool to help check for missing translations
Summary: Need tool to help check for missing translations
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Network
Classification: Retired
Component: RHN/R&D
Version: RHN Devel
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Mike McCune
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-01-04 22:37 UTC by Mike McCune
Modified: 2008-10-17 18:08 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2008-10-17 18:08:36 UTC
Embargoed:


Attachments (Terms of Use)

Description Mike McCune 2005-01-04 22:37:04 UTC
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 22:37:39 UTC
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 23:23:59 UTC
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 18:08:36 UTC
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.