Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 144189

Summary: Need tool to help check for missing translations
Product: [Retired] Red Hat Network Reporter: Mike McCune <mmccune>
Component: RHN/R&DAssignee: Mike McCune <mmccune>
Status: CLOSED WONTFIX QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: medium Docs Contact:
Priority: medium    
Version: RHN Devel   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-10-17 18:08:36 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.