Products

Solutions

Resources

Partners

Community

About

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsLanguage PacksLanguage PacksModule LocalizerModule Localizer
Previous
 
Next
New Post
1/12/2006 10:30 PM
 

I've published a small utility that helps module developper and localizer building the Resx files. It does 2 things:

  • When "ShowMissingKeys" is enabled, a log admin.alert is generated for every missing key found when navigating the portal. My module processes those logs to build the keys and tries to guess the control texts from their Ids with a simple regex (take out the prefix, split the camel case)
  • Once the keys are done, the module can fill the missing translation by using a translating web service.

Of course, automatic translation is usually not that good, but it can perform tons of preprocessing that makes the resulting work much easier.

I did not spend too much time on that module, it's pretty dirty but it may be a good start to include new features in the core.

So if you want to have a look Vinç', the PA contains the source.


Jesse
CTO - Aricie
 
New Post
1/13/2006 3:20 AM
 
Thanks for the offer, but I not very sure this is a good idea to add automatic translation to core.
While I can see the interest in the tool for module developers if it helps ease their task, I don't think this should be a built-in feature.

Vicenç Masanas
Banyoles, Girona - Spain

Disgrafic.com    PSD to DNN
 
New Post
1/13/2006 5:20 AM
 

Ok I see the point and for the automatic translation I agree DNN core can't really afford to rely on third party webservices, unless they're bullet proof, which isn't the case.

Maybe it is a little different with the first method, which extends the ShowMissingKey feature, and to my opinion give it some more sense, by providing an handling for the admin alerts. 

Building the resource keys seems to me as the most tedious task when localizing a module, and it feels a bit frustrating to be able to log all the missing keys but still have to add them one by one manually, which is also something you can't do online.


Jesse
CTO - Aricie
 
New Post
1/13/2006 5:25 AM
 

We lately added this code for logging that missing keys:

If showMissingKeys Then

Dim objEventLog As New Services.Log.EventLog.EventLogController

objEventLog.AddLog("Key Missing for: ", name + " in " + ResourceFileRoot, objPortalSettings, Null.NullInteger, DotNetNuke.Services.Log.EventLog.EventLogController.EventLogType.ADMIN_ALERT)

Return "RESX:" & name

End If

So the log is done, but the problem on adding them automatically is that you still need to translate them! And if they're added and not translated you will loose the notification it provides, so completely defeating the purpose of it.

But you're not right when you say this cannot be done online: go to the language editor and select the file you're translating that misses some keys. You'll get the option to add them.


Vicenç Masanas
Banyoles, Girona - Spain

Disgrafic.com    PSD to DNN
 
New Post
1/13/2006 7:04 AM
 

The code you give here is what my module bases on to write the keys.

I can see two things that bring the confusion there:

First you need to write the first key in the system locale reference file. This is what the module does with the first command and that you can't do online.

Then you can indeed add the missing keys in the other locales files, but this is by copying the nodes from the reference file to the localized one. I haven't seen any function in dnn that helps actually building the reference file, except for the logs. That's the primary purpose of my module. The english text it adds is inferred from the control name by playing with a regex, since most module makers use the same syntax: prefix for the control type (pl, txt, chk...) + camel case for the control name.

So when it analyses the log, the module will create the key (and the file if it does not exist) and the related text.

Of course one may whish to modify the initial texts, that can be done online with your editor, so I think it's still easier than building the xml from scratch.

Same for the translation: the call to the webservice does a bit what your "add missing key" does except that it it performs an automatic translation with the web service on the fly and it does it for the whole install or a single module. Correcting the biased translation is again easier than starting from scratch with the english version.

I'd say that with a regular module, the first option gets the correct english name for more than 50% of the resource keys ("plMyControl" usually gets an english "My Control" reference text).

That of course encourages to use processable control IDs such admin controls ones, which I think is also a good thing, since it normalizes the naming conventions. But even if you have other kind of Ids, and don't rely on the regex trick, it's still much easier to correct the keys than to write the XML from scratch. 

Then again the automatized translation results correct for about 50% of the keys -> this is very true for small texts where word by word translation is OK, and this is usually more than half of what you need to translate.

So you can except that half the whole localization job is all done automatically + the fact that the rest is just about correcting the translation instead of building them from scratch. I really think there is some gain of productivity there, thus my proposal to check if something can be added to the core.

Since most members were private in your classes I add to copy loads of your code back in the module. That's because I'm really basing on your code in the first place and only extending it, and that's what made me think you may want to have a look at the module.


Jesse
CTO - Aricie
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsLanguage PacksLanguage PacksModule LocalizerModule Localizer


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out