0

I'd like to localize wiki interface, so i can really use public wiki and don't confuse non english speaking users.

I went to templates, and i see that almost all text in the left sidebard is hardcoded somewhere (?). I guess, that's in the wiki placeholders.

I can't change strings such as "new article", "index", "recently changed", etc.

Shouldn't i be able to do this somehow?

flag
Somehow created duplicate account. Can you please merge them somehow, or move this question to my real acc. Wasn't able to find a login link, stupid me =[ – Alexander Gornik Apr 27 2011 at 5:48

1 Answer

1

All the strings that are displayed in the FogBugz UI are localized based on your site's default language (Admin -> Site Configuration -> Regional -> Language).

That being said, a number of our translations are out of date and/or incomplete. This article has more details.

As a workaround, you could include some JavaScript in your Wiki Template that patches up these strings:

var rgMenuTitles =  [
                'Page collections fixed',
                'Attributes fixed',
                'Hierarchy fixed'
            ];

var sNewArticleText = 'New Article Fixed';

var rgPageCollections = [
                [400, 'Title Index Fixed', 'title_index.png'],
                [300, 'Recently Changed Fixed', 'recent.png'],
                [200, 'Page Hierarchy Fixed', 'hierarchy.png'],
                [100, 'Incomplete Fixed', 'incomplete.png']
            ];

var rgAttributes =  [
                [100, 'Tags Fixed', 'tags.png']
            ];

// fix up the section titles
$('div.wiki-page-browse-menu-title').each(function(ix, el){
    $(this).text(rgMenuTitles[ix]);
});

// fix up the new article link text
$('li.wiki-page-browse-new a').text(sNewArticleText);

// fix up the "page collection" links
for(var ix = 0; ix < rgPageCollections.length; ix++){
    $('ul.wiki-page-browse-menu:eq(1) li[ixpriority="' + rgPageCollections[ix][0] + '"] a')
    .html('<img title="' + rgPageCollections[ix][1] + '" alt="' + rgPageCollections[ix][1]+ '" src="default.asp?pg=pgPluginStatic&sPluginId=WikiNavigationPlugin@fogcreek.com&sFilename=img%2f' + rgPageCollections[ix][2] + '"> ' + rgPageCollections[ix][1]);
}

// fix up the "attrubtes" links
for(var ix = 0; ix < rgAttributes.length; ix++){
    $('ul.wiki-page-browse-menu:eq(2) li[ixpriority="' + rgAttributes[ix][0] + '"] a')
    .html('<img title="' + rgAttributes[ix][1] + '" alt="' + rgAttributes[ix][1]+ '" src="default.asp?pg=pgPluginStatic&sPluginId=WikiNavigationPlugin@fogcreek.com&sFilename=img%2f' + rgAttributes[ix][2] + '"> ' + rgAttributes[ix][1]);
}

It's not a particularly pretty fix, but hopefully it's enough to get you going.

link|flag
Thanks, it worked. Although, you have an error in following line: ... src="default.asp?pg=pgPluginStatic&ixPlugin=31&sFilename=img%2f' + ... Should be ixPlugin=29, at least in our installation. – Alexander Gornik Aug 11 at 8:15
Woops! 31 was the right number for my test account, but I've updated the code so it should work on any installation now. Good catch! – db Aug 11 at 12:42

Your Answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.