Hello,
I need a tool to edit CPL files. I have done quite a bit of searching on Google and here, but none of the tools found on the net are actually intended for CPL files, while threads here only mention people editing them, not how.
Why I want to do this - I would like to edit Japanese text inside these CPLs so that I can fully localize my device(s) into English.
These are some of the files:
- ShPowerMng.cpl
- ShUsbCnt.cpl
- ShWrlsMgrRes.cpl
- shutil.cpl
Thanks in advance!
cheeseus said:
Hello,
I need a tool to edit CPL files. I have done quite a bit of searching on Google and here, but none of the tools found on the net are actually intended for CPL files, while threads here only mention people editing them, not how.
Why I want to do this - I would like to edit Japanese text inside these CPLs so that I can fully localize my device(s) into English.
These are some of the files:
- ShPowerMng.cpl
- ShUsbCnt.cpl
- ShWrlsMgrRes.cpl
- shutil.cpl
Thanks in advance!
Click to expand...
Click to collapse
did you try looking in the reg for it... i think its something like HKCU\***\MyCpl
irus said:
did you try looking in the reg for it... i think its something like HKCU\***\MyCpl
Click to expand...
Click to collapse
Yes, of course, I have looked through each registry folder - this is how, for instance, I found out how to translate Today items and Button descriptions (HKLM/Software/MS/Shell/Keys).
Suggested from posts here about HTC devices, I looked for HKEY_LOCAL_MACHINE\ControlPanel\MyCpl --- but I do not have such a registry setting.
Is it a far guess to tell that the files I mention above are used instead of registry settings?
This is why I am looking for a tool to edit these files. Is there one?
Any resource editor would do, try reshacker
stepw said:
Any resource editor would do, try reshacker
Click to expand...
Click to collapse
Thank you! Reshacker does open the files.
How to edit them, though, is less obvious than I thought. I was thinking there'd be strings of text I would just need to replace.
I'd like to ask for more help here, please.
For instance, I have:
Code:
STRINGTABLE
LANGUAGE LANG_JAPANESE, 0x1
{
101, "???????"
102, "Utility Applet"
}
1st Question: how can I see the Japanese text not garbled?
2nd: The two values above - do I just switch them somehow? 101, "???????" is the Japanese correspondent of 102, "Utility Applet".
Similarly here:
Code:
119 DIALOG 0, 0, 200, 110
STYLE DS_FIXEDSYS | WS_CHILD | WS_DISABLED
CAPTION ""
LANGUAGE LANG_JAPANESE, 0x1
FONT 8, "MS Shell Dlg"
{
CONTROL "????????????????\n??????", 1067, STATIC, SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 6, 6, 138, 24
CONTROL "???????(????)", 1006, BUTTON, BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE, 6, 42, 120, 12
CONTROL "???????????????\n(???????????)", 1007, BUTTON, BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE | WS_CHILD | WS_VISIBLE, 6, 60, 126, 24
CONTROL "*RGB???????????????", 1068, STATIC, SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 6, 84, 138, 12
}
How do I change the language - LANGUAGE LANG_JAPANESE, 0x1?
And, of course, if I can't see the Japanese text, I can't translate it -- I tried the various fonts available in ResHacker, but none of them seems to support Japanese.
PS. After installing Japanese (East Asian) Languages support on my PC, ResHacker now offers a couple more fonts that have "Japanese" under "Script", e.g. MS Mincho, MS Gothic etc. but they are still unable to properly render the Japanese text of the CPL file, whose font is "MS Shell Dlg".
cheeseus said:
Thank you! Reshacker does open the files.
How to edit them, though, is less obvious than I thought. I was thinking there'd be strings of text I would just need to replace.
I'd like to ask for more help here, please.
For instance, I have:
Code:
STRINGTABLE
LANGUAGE LANG_JAPANESE, 0x1
{
101, "???????"
102, "Utility Applet"
}
1st Question: how can I see the Japanese text not garbled?
2nd: The two values above - do I just switch them somehow? 101, "???????" is the Japanese correspondent of 102, "Utility Applet".
Similarly here:
Code:
119 DIALOG 0, 0, 200, 110
STYLE DS_FIXEDSYS | WS_CHILD | WS_DISABLED
CAPTION ""
LANGUAGE LANG_JAPANESE, 0x1
FONT 8, "MS Shell Dlg"
{
CONTROL "????????????????\n??????", 1067, STATIC, SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 6, 6, 138, 24
CONTROL "???????(????)", 1006, BUTTON, BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE, 6, 42, 120, 12
CONTROL "???????????????\n(???????????)", 1007, BUTTON, BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE | WS_CHILD | WS_VISIBLE, 6, 60, 126, 24
CONTROL "*RGB???????????????", 1068, STATIC, SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 6, 84, 138, 12
}
How do I change the language - LANGUAGE LANG_JAPANESE, 0x1?
And, of course, if I can't see the Japanese text, I can't translate it -- I tried the various fonts available in ResHacker, but none of them seems to support Japanese.
PS. After installing Japanese (East Asian) Languages support on my PC, ResHacker now offers a couple more fonts that have "Japanese" under "Script", e.g. MS Mincho, MS Gothic etc. but they are still unable to properly render the Japanese text of the CPL file, whose font is "MS Shell Dlg".
Click to expand...
Click to collapse
Try PE-explorer, this one gives you more power and also will display an example of the form (for certain compilers).
Regards,
EqX
the-equinoxe said:
Try PE-explorer, this one gives you more power and also will display an example of the form (for certain compilers).
Regards,
EqX
Click to expand...
Click to collapse
Thanks! Tried PE explorer as well. Just like ResHacker, it displays the form, but not the form is actually readable - ResHacker displays garbled chars in the script and the form, PE -- only in the script. Sadly, I still can't see, and copy, the Japanese text so that I can have it translated. Tried the various fonts in PE Explorer too...
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
cheeseus said:
Thanks! Tried PE explorer as well. Just like ResHacker, it displays the form, but not the form is actually readable - ResHacker displays garbled chars in the script and the form, PE -- only in the script. Sadly, I still can't see, and copy, the Japanese text so that I can have it translated. Tried the various fonts in PE Explorer too...
Click to expand...
Click to collapse
It seems that those scripts can handle only western language .
If you try to edit the form (like moving Tedit boxes etc..), is there any chance to grep the text?
And if you look in the hex editor, any chance to get it from there?
(there is a program that can get the text from a dialog, sadly I forgot it's name.)
Regards,
EqX
the-equinoxe said:
It seems that those scripts can handle only western language .
If you try to edit the form (like moving Tedit boxes etc..), is there any chance to grep the text?
And if you look in the hex editor, any chance to get it from there?
(there is a program that can get the text from a dialog, sadly I forgot it's name.)
Regards,
EqX
Click to expand...
Click to collapse
Couldn't grip the text from the form editor - can move it around, but can't select it.
Can't find out how to see the file in HEX editor mode - this stuff is quite new to me...
The best idea I had was use OCR software to extract the text from a screenshot of the form. Abbyy Fine Reader 9 advertises Japanese/Chinese support but the copy I found doesn't have Japanese in its list of languages... so, I am stuck here, unless you can remember that program;s name
Regards,
Stefan
Little progress
I am having very little progress here...
I started editing the "ShPowerMng.cpl" file by looking at my other device and comparing tabs and options. And so I translated two screens. However, when I upload the file to the device, only the tab names are in English, while the other stuff I translated is still in Japanese
Tried resetting the device... no change.
When I copy back the ShPowerMng.cpl file from the device to the PC - checking if the file was successfully overwritten - it is translated, but why doesn't it show the English text?
cheeseus said:
I am having very little progress here...
I started editing the "ShPowerMng.cpl" file by looking at my other device and comparing tabs and options. And so I translated two screens. However, when I upload the file to the device, only the tab names are in English, while the other stuff I translated is still in Japanese
Tried resetting the device... no change.
When I copy back the ShPowerMng.cpl file from the device to the PC - checking if the file was successfully overwritten - it is translated, but why doesn't it show the English text?
Click to expand...
Click to collapse
Could be that the cpl has a separate "strings" section in the resources, or that the ROM also contains a ShPowerMng.cpl.04**.MUI file (not sure that cpl files can have a mui).
Regards,
EqX
the-equinoxe said:
Could be that the cpl has a separate "strings" section in the resources, or that the ROM also contains a ShPowerMng.cpl.04**.MUI file (not sure that cpl files can have a mui).
Regards,
EqX
Click to expand...
Click to collapse
Excellent point, .mui seems to be supported for .cpl's too. If there's a native mui file, this is where the resources should be translated. If there's none, it could be created for ease of translation, then you won't have to patch up .cpl's.
More details regarding MUI on Windows CE/Mobile are avaiable on MSDN:
http://msdn.microsoft.com/en-us/library/aa913592.aspx
http://msdn.microsoft.com/en-us/library/aa912683.aspx
Most resource editors don't support unicode string resources properly, hence Japanese characters are replaced with question marks. MS Visual Studio resource editors may be able to handle them properly. Another freeware that claims proper unicode support is XN resource viewer, maybe you could get the chars displayed properly using it.
stepw said:
Excellent point, .mui seems to be supported for .cpl's too. If there's a native mui file, this is where the resources should be translated. If there's none, it could be created for ease of translation, then you won't have to patch up .cpl's.
More details regarding MUI on Windows CE/Mobile are avaiable on MSDN:
http://msdn.microsoft.com/en-us/library/aa913592.aspx
http://msdn.microsoft.com/en-us/library/aa912683.aspx
Most resource editors don't support unicode string resources properly, hence Japanese characters are replaced with question marks. MS Visual Studio resource editors may be able to handle them properly. Another freeware that claims proper unicode support is XN resource viewer, maybe you could get the chars displayed properly using it.
Click to expand...
Click to collapse
XN Resource Editor saves the day!
However, because it returns save error for some of the files (write protected), I open the resource in it, copy the caption text in Japanese, paste in Google Translate, take the text and paste it inside the corresponding box in PE Explorer because it has no problem saving the file.
I have made significant progress this way, THANK YOU!
There are still some unknown problems:
- on the Power Management file (ShPowerMng.cpl), everything is translated but only the title and the tab captions are shown in English - the rest is still displayed in Japanese.
- on the Utilities file (shutil.cpl) - again everything is translated, but this time the tab captions are shown in Japanese, while the tab texts are all in English.
- on the USB connection manager (ShUsbCnt.cpl) the situation is as in the Power Management - tab names are in English, texts are in Japanese.
- the ShSystemInfo.cpl file is fully translated but I cannot see its contents in Settings - when I tap "S01SH Firmware", which is this file, I see only one page with some text that I could not see while editing, while the texts I edited are hidden. The text I can see is about the firmware version - 1.05a (upgraded from 1.00) - in Japanese, and the texts I cannot see contain: "Firmware version 0.00 / NAND ver.: / NOR ver.:" and over 10 other screens with texts that I presume are various warning messages displayed by the system, e.g. "An invalid argument was encountered."
Thanks for the help, guys! I hope that I can finish the job...
Some strings, for instance tab captions and window titles may be dynamic and the strings could be manipulated in code. In this case you won't be able to find them in the resource sections.
Use Sisulizer, it correctly displays all the languages, including Japanese
the big question
So, what I am still struggling to grasp is, where exactly are the texts written?
stepw says: "Some strings, for instance tab captions and window titles may be dynamic and the strings could be manipulated in code. In this case you won't be able to find them in the resource sections." --- does this then mean that the texts, written inside the CPL file are just there for no reason:
[above is the resource being edited, below is a screenshot of the resource displayed - tab names are in English, the rest is not displayed...]
Maybe these texts are also written in some other file and when the two files are loaded, the first one has greater weight than the CPL?
I also tried, following your advice to try creating a MUI file - in Windows directory there is also a "ShPowerMng.cpl.409.mui" file but it doesn't seem to change anything.
Maybe there is some other file I need to edit as well?
PS. I realize this thread has changed its original topic - the tool to edit CPL files - but I don't want to start a new thread for something which very few people would be interested in.
----------------------
PSPS. Looking at this thread, I see that the following are displayed from "cplmain.cpl":
Settings>System>Backlight>Brightness = 20#ctlpnl cplmain.cpl,6
Settings>System>Backlight>Battery power= 20#ctlpnl cplmain.cpl,6,1
Settings>System>Backlight>External power = 20#ctlpnl cplmain.cpl,6,2
Unfortunately, this is the only CPL file that I can't copy from my device - I get "cannot copy" in total commander and "access denied" in activesync. Any idea how I can cheat this?
cheeseus said:
...Unfortunately, this is the only CPL file that I can't copy from my device - I get "cannot copy" in total commander and "access denied" in activesync. Any idea how I can cheat this?...
Click to expand...
Click to collapse
try it with ROM Extractor 1.0. with that tool you can copy "non-copyable" files from device to storage card, and from there to your computer (via active sync). you'll have to do these steps on your device off course ;-)
see you
kel187 said:
try it with ROM Extractor 1.0. with that tool you can copy "non-copyable" files from device to storage card, and from there to your computer (via active sync). you'll have to do these steps on your device off course ;-)
see you
Click to expand...
Click to collapse
Thanks! ROM Extractor did manage to copy cplmain.cpl but it cannot be edited - ResHack and XN Resource Editor won't open it, while PE Editor opens it but gives a warning of some errors ("Erros detected! File opened in Safe Mode."). Still, the Resources are not viewable (View > Resources is grey) so even if there is text that should be edited in there I cannot get to it.
So, maybe I am looking in the wrong direction?
Yesterday I managed to completely edit another one of the CPLs, Pointing.cpl, which deals with the pointing device on my S01SH - I still have to fix the sizes of a couple of text boxes because some text is cut off but that isn't difficult.
Where else should I be looking for stuff to edit/translate?
While working on a ROM (for the hero), I have recently tried to do some theming by small changes (i.e. color changes) to the drawables in the framework-res.apk.
It appears the both for me, and the fellow that is helping me (floomat), these 9-patch files are giving a headache. We prefer editing them in some normal app (i.e. photoshop) but this seems to mess up the 9-patch "code".
I have written a very small program to apply the changes to a 9-patch image without disturbing the 9-patch itself. Note that this program is mainly meant as a "proof of concept" and hopefully one of the apk managing tools will pick up the ball and integrate it. In the meantime it might be useful even as it is (with some scripting around it most likely). Or it might be just a way to prove I am fool and there is simpler way to get around this I am not familiar with
"Program" and source: http://www.sendspace.com/file/sw4atc
(its really too small and simple to be called a program)
Usage:
Code:
java copy9patch original.9.png changed.png
Will copy the changes made to the changed.png over to the original.9.png but keep the 9-patch data of the original.9.png.
Its code (also included) and the way it works is very simple: It takes the size of the original image (i.e. 19x27), without the 1 pixel border with the 9-patch codes - so in our example it will be 17x25. Now it just copied the center 17x25 pixels from the changed.png over the original's center pixels. It has some very basic boundary conditions if the image sizes do not match but this could probably be handled better, possibly just by issuing an error in these cases.
If you want to use my code, change it, do whatever you like with it please do so and I'll be glad to checkout your result!
NOTE: I feel a bit uncomfortable posting this in the "G1 development" section but I see both apktool and apk manager are here....
erasmux said:
While working on a ROM (for the hero), I have recently tried to do some theming by small changes (i.e. color changes) to the drawables in the framework-res.apk.
It appears the both for me, and the fellow that is helping me (floomat), these 9-patch files are giving a headache. We prefer editing them in some normal app (i.e. photoshop) but this seems to mess up the 9-patch "code".
I have written a very small program to apply the changes to a 9-patch image without disturbing the 9-patch itself. Note that this program is mainly meant as a "proof of concept" and hopefully one of the apk managing tools will pick up the ball and integrate it. In the meantime it might be useful even as it is (with some scripting around it most likely). Or it might be just a way to prove I am fool and there is simpler way to get around this I am not familiar with
"Program" and source: http://www.sendspace.com/file/sw4atc
(its really too small and simple to be called a program)
Usage:
Code:
java copy9patch original.9.png changed.png
Will copy the changes made to the changed.png over to the original.9.png but keep the 9-patch data of the original.9.png.
Its code (also included) and the way it works is very simple: It takes the size of the original image (i.e. 19x27), without the 1 pixel border with the 9-patch codes - so in our example it will be 17x25. Now it just copied the center 17x25 pixels from the changed.png over the original's center pixels. It has some very basic boundary conditions if the image sizes do not match but this could probably be handled better, possibly just by issuing an error in these cases.
NOTE: I feel a bit uncomfortable posting this in the "G1 development" section but I see both apktool and apk manager are here....
Click to expand...
Click to collapse
Huh. I've been wondering if this was possible. I haven't tried this yet but if it works, nicely done! I think that this would be a huge improvement and addition to the themeporter programs that are out there. There is a high demand for this in that area and in the area of HDPI>MDPI/MDPI>HDPI conversion. I'm certainly bookmarking this!
Awesome, just checked out ur source, so simple but effective
Anyway wanted to ask if ur ok with me incorporating it into theme-porter ? Link
Wht im thinking is perhaps when "Hdpi to mdpi" is on, it would resize the .9.pngs by 66%, after which it would transfer the .9 data using this program so (9-patch) code is preserved.
Let me know. Thnx
FYI : Just gave it a whirl, works perfectly.
Daneshm90 said:
Awesome, just checked out ur source, so simple but effective
Anyway wanted to ask if ur ok with me incorporating it into theme-porter ? Link
Wht im thinking is perhaps when "Hdpi to mdpi" is on, it would resize the .9.pngs by 66%, after which it would transfer the .9 data using this program so (9-patch) code is preserved.
Let me know. Thnx
FYI : Just gave it a whirl, works perfectly.
Click to expand...
Click to collapse
Maybe my original post wasn't blunt enough, my code is just "proof of concept" because I am bit lazy in this department (themeing tools) - I'd rather spend my time compiling kernels (go figure ).
So my main goal for this post is for developers of apk managing tools and etc. to pick up the ball and go forward with this
And to be even clearer:
If you want to use my code, change it, do whatever you like with it please do so and I'll be glad to checkout your result!
(am also adding this to the main post)
Regarding your actual resizing idea, you might want to resize it with the 9-patch "codes" (in the 1-pixel border) because you want the codes from your original HDMI files just resized. This should work, just be careful with resizing algorithms which average pixels and such. If I understand correctly the edge pixels should be either white or black (defining stretchable and context areas). Need to play around with this until it works well.
Let me know if I can be of any further assistance.
erasmux said:
Maybe my original post wasn't blunt enough, my code is just "proof of concept" because I am bit lazy in this department (themeing tools) - I'd rather spend my time compiling kernels (go figure ).
So my main goal for this post is for developers of apk managing tools and etc. to pick up the ball and go forward with this
And to be even clearer:
If you want to use my code, change it, do whatever you like with it please do so and I'll be glad to checkout your result!
(am also adding this to the main post)
Regarding your actual resizing idea, you might want to resize it with the 9-patch "codes" (in the 1-pixel border) because you want the codes from your original HDMI files just resized. This should work, just be careful with resizing algorithms which average pixels and such. If I understand correctly the edge pixels should be either white or black (defining stretchable and context areas). Need to play around with this until it works well.
Let me know if I can be of any further assistance.
Click to expand...
Click to collapse
Hmm k i'll spend more time with it, perhaps the resizing program im using causes mishaps. Currently when i resize it completely messes stuff up even though the resolution corresponds to a mdpi device.
I'll do the good ol' trial/error n let u know. Thanks for the (proof of concept)
Edit :
Ok so upon using ur code for transferring images of diff sizes u can obviously tell whts up
So one improvement im thinking off, is if the images differ in size, it could draw the border and eliminate anything outside it. Ugh gotta brush up on my java though :S
bump
10 del al char har
bump
I tested it out and it works great! Thanks!
I really hope someone takes this idea and runs with it! If I knew how to code, I would certainly look into this. Maybe I can get one of the Vibrant Devs to look at this....
erasmux said:
While working on a ROM (for the hero), I have recently tried to do some theming by small changes (i.e. color changes) to the drawables in the framework-res.apk.
It appears the both for me, and the fellow that is helping me (floomat), these 9-patch files are giving a headache. We prefer editing them in some normal app (i.e. photoshop) but this seems to mess up the 9-patch "code".
I have written a very small program to apply the changes to a 9-patch image without disturbing the 9-patch itself. Note that this program is mainly meant as a "proof of concept" and hopefully one of the apk managing tools will pick up the ball and integrate it. In the meantime it might be useful even as it is (with some scripting around it most likely). Or it might be just a way to prove I am fool and there is simpler way to get around this I am not familiar with
"Program" and source: http://www.sendspace.com/file/sw4atc
(its really too small and simple to be called a program)
Usage:
Code:
java copy9patch original.9.png changed.png
Will copy the changes made to the changed.png over to the original.9.png but keep the 9-patch data of the original.9.png.
Its code (also included) and the way it works is very simple: It takes the size of the original image (i.e. 19x27), without the 1 pixel border with the 9-patch codes - so in our example it will be 17x25. Now it just copied the center 17x25 pixels from the changed.png over the original's center pixels. It has some very basic boundary conditions if the image sizes do not match but this could probably be handled better, possibly just by issuing an error in these cases.
If you want to use my code, change it, do whatever you like with it please do so and I'll be glad to checkout your result!
NOTE: I feel a bit uncomfortable posting this in the "G1 development" section but I see both apktool and apk manager are here....
Click to expand...
Click to collapse
Can U just tell how to use this code for bulk images?????
pratyush.creed said:
Can U just tell how to use this code for bulk images?????
Click to expand...
Click to collapse
Hmm, haven't used this for a very long time and don't really remember whats going on here.
Still attached is the version which I have on my HD, and it does support bulk images if all the images are in a folder.
If I remember correctly (mostly going by the help that is displayed by running the program without argument):
Code:
fixResPngs drawable-mdpi drawable-mdpi.org
Will go over all drawable-mdpi/*.png files (possibly also sub dirs?! I really have no idea, sorry), and "fix" each such file. If I am not mistaken it needs a "reference" file only for 9 patch files which are identified by their ".9.png" suffix (regular pngs I think are just rewritten without any change which I found improves compatibility). In case of a 9 patch file, the original file with exactly the same name should be found under the directory given in the second argument. For example: If drawable-mdpi/aaa.9.png is processed the 9-patch data will be copied from drawable-mdpi.org/aaa.9.png.
Obviously it also still works on single files. It does *not* work on lists of files or lists of directories.
If anyone is interested in the code, I am sure I have it somewhere (I hope)....
erasmux said:
Hmm, haven't used this for a very long time and don't really remember whats going on here.
Still attached is the version which I have on my HD, and it does support bulk images if all the images are in a folder.
If I remember correctly (mostly going by the help that is displayed by running the program without argument):
Code:
fixResPngs drawable-mdpi drawable-mdpi.org
Will go over all drawable-mdpi/*.png files (possibly also sub dirs?! I really have no idea, sorry), and "fix" each such file. If I am not mistaken it needs a "reference" file only for 9 patch files which are identified by their ".9.png" suffix (regular pngs I think are just rewritten without any change which I found improves compatibility). In case of a 9 patch file, the original file with exactly the same name should be found under the directory given in the second argument. For example: If drawable-mdpi/aaa.9.png is processed the 9-patch data will be copied from drawable-mdpi.org/aaa.9.png.
Obviously it also still works on single files. It does *not* work on lists of files or lists of directories.
If anyone is interested in the code, I am sure I have it somewhere (I hope)....
Click to expand...
Click to collapse
Gr8 work...u made themin a kid's job
Sent from my GT-S5670 using XDA Premium App
???
does the original still work cause im on windows 7 64 bit and i was able to copy the changes to original but not it makes no changes at all, so the original file doesnt get the changes...
please help!!
Ok heres whats going on I'm attempting to translate this awesome launcher from here. http://www.joymms.com/english/ from Chinese to English
So that it looks like like the English part of the attached picture.
These are the instructions. I'm putting the decompiled files in Zip in the attachment. If you don't know Chinese send your Chinese to zergburger unless you are totally confident in Google translate.
You have to use apktool to decompile the apk, go through the smali files and find the \uxxx unicode strings. Take these strings and put them in a site like this: http://people.w3.org/rishida/tools/conversion/ which will convert the utf16 to the actual characters. You can then take that and paste it into google translator or whatever and translate the information.
Than put the new translated Charters back into the converter than take the string codes and replace the codes in the file save it than send them to me so I can compile all of them.
Good luck I really like this application and this is gonna take a while
Thank you samspoon for the instructions
Total 631 Smili files
3 Translated
117 That need Translation
2.5% complete
Code:
Need Translation:
AndroidWindows7$18
AndroidWindows7$19
AndroidWindows7$20
AndroidWindows7$21
AndroidWindows7$23
AndroidWindows7$24
AndroidWindows7$26
AndroidWindows7$30
AndroidWindows7$32
AndroidWindows7$33
AndroidWindows7
AppBarClock$1
AppBarClock$3
AudioStatus$1
BaseWindow
CalendarPicker
ChineseCalendar
DesktopIcons$3$1
DesktopIcons$3
DownloadProcessBar$1
DownloadProcessBar$4
DownloadProcessBar
Execute
ExecuteNaviBar
InstalledApps$1
InstalledApps
MainApp
MessageBubble$6
MessageBubble$7
MessageBubble
MyComputer$12$1
MyComputer$12
MyComputer$13$1
MyComputer$13
MyComputer$14
MyComputer$16
MyComputer$18$1
MyComputer$18
MyComputer
RandomChat$3
RandomChat
RunningAppBar$1$1
RunningAppBar$1
RunningAppBar$8$1
RunningAppBar$8
RunningAppBar$10$1
RunningAppBar$10
RunningAppBar
SelectDir$3
SelectDir
Setting$1$2
Setting$1
Setting
SettingDesktopBg$3
SettingDesktopBg
SettingDesktopIcon$1
SettingDesktopIcon$3
SettingDesktopIcon$5
SettingDesktopIcon$9
SettingDesktopIcon$SelectedListAdapter
SettingDesktopIcon
SettingSideBar
SettingStartMenuIcon$1$1
SettingStartMenuIcon$1
SettingStartMenuIcon$3
SettingStartMenuIcon$7
SettingStartMenuIcon$SelectedListAdapter
SettingStartMenuIcon
SideBarCalendar$1
SideBarCalendar$3
SideBarClock$3
SideBarMessageTips$1
SideBarMessageTips
SideBarUserStatus$1
SideBarUserStatus$4
SideBarUserStatus
SideBarWeather$1
SideBarWeather$4
SideBarWeather$6
SideBarWeather$8
SideBarWeather$9
SideBarWeather
StartMenu$2
StartMenu$3
StartMenu$4
StartMenu$5
StartMenu$6
StartMenu$7
StartMenu$8
StartMenu$9$1
StartMenu$9
StartMenu
SystemInfo
TaskListAdapters$ServiceListAdapter
TaskManagerCtrl
UnInstalledApps$2$1$1
UnInstalledApps$2$1
UnInstalledApps$2
UnInstalledApps
Usage$1$1
Usage$1$2
Usage$1
Usage
UserInfo$4
UserInfo$6
UserInfo
UserLogin$1
UserLogin$3
UserLogin$5
UserLogin
UserPass$3
UserPass
UserPreRegist
WeatherCity$7
WeatherCity
WindowsIE$5
WindowsIE
Code:
Are Translated:
AboutUs$4
AboutUs$5
AboutUs
I'm in the process of translating/organizing
Samspoon's version http://www.multiupload.com/9IWXYZ4L7Q
Just a word of advice but you should setup some format for translating... I.e say you have a string that you modify:
(for examples sake)
const-string v8, "\u78c1\u76d8\u5bb9\u91cf\u4fe1\u606f\u83b7\u53d6\u5931\u8d25"
now according to google translate this is close to "Failed to read disk"
so if you formatted the string so the old is there along with the new something like this:
const-string v8, "[[[\u78c1\u76d8\u5bb9\u91cf\u4fe1\u606f\u83b7\u53d6\u5931\u8d25]]][[[Failed to read disk]]]"
You could then make a bash script that will go through and replace the string with the proper translated information... You could then take these strings to search future updates to the app to make translating easier on you. Just a piece of advice not sure how good you are with scripting but if you are serious about this might as well make it workable for updates. Any format would do I was just giving you advice.
Hell pulling the strings into a single file and then having it like
STRING~TRANSLATED
in a flat file would allow you to do a mass-sed on all smali files i.e
for translated in $( cat translation )
do
string=echo $translated|cut -d~ -f1
english=echo $translated|cut -d~ -f2
for file in $( ls /path/to/smali/*.smali )
do
sed -e "s/$string/$english/" $file
done
done
at least that way you can easily keep updated and also allow for other languages to be localized.
samspoon said:
Just a word of advice but you should setup some format for translating... I.e say you have a string that you modify:
(for examples sake)
const-string v8, "\u78c1\u76d8\u5bb9\u91cf\u4fe1\u606f\u83b7\u53d6\u5931\u8d25"
now according to google translate this is close to "Failed to read disk"
so if you formatted the string so the old is there along with the new something like this:
const-string v8, "[[[\u78c1\u76d8\u5bb9\u91cf\u4fe1\u606f\u83b7\u53d6\u5931\u8d25]]][[[Failed to read disk]]]"
You could then make a bash script that will go through and replace the string with the proper translated information... You could then take these strings to search future updates to the app to make translating easier on you. Just a piece of advice not sure how good you are with scripting but if you are serious about this might as well make it workable for updates. Any format would do I was just giving you advice.
Hell pulling the strings into a single file and then having it like
STRING~TRANSLATED
in a flat file would allow you to do a mass-sed on all smali files i.e
for translated in $( cat translation )
do
string=echo $translated|cut -d~ -f1
english=echo $translated|cut -d~ -f2
for file in $( ls /path/to/smali/*.smali )
do
sed -e "s/$string/$english/" $file
done
done
at least that way you can easily keep updated and also allow for other languages to be localized.
Click to expand...
Click to collapse
That pushes the limits of my skills, but I will put the translated versions all together to make future updates easier. I'm only in college I'm not a pro yet
You guys rock! you are all pros! yew cin dew eeeet!!! =) go go go!
here translate this txt file. I used magicks to strip the text from the smali files and removed duplicate lines. Instead of 431 lines to translate I brought it down to 296.
Format your translation like such so I can easily script it:
"THISISTHEUTFSTUFF"~"THISISTHETRANSLATEDSTRING"
For example:
"\u672c\u5730\u78c1\u76d8(C"~"Local Disk (C"
Once this is done I can inject this fairly easily back into the apk.
OH YEAH... One thing: In the strings you might see stuff like \n\n or just one. ANY STRING THAT HAS A BACKSLASH FOLLOWED BY 1 CHARACTER SHOULD BE RETAINED IN THE STRING. THIS IS USED FOR FORMATTING. \n IS A NEW LINE!
For example:
"\u7248\u6743\u6240\u6709 CopyRight 2009-2010\n\n\u5f00\u53d1\u5546\uff1a\u4e0a\u6d77\u5b87\u7a7a\u8f6f\u4ef6\u6709\u9650\u516c\u53f8"~"Copyright 2009-2010 \n\n Developer: Shanghai Aerospace Software Ltd."
I attached a txt file that has already been converted to the actual characters as well for the lazy peeps
Girls voice for the top of the hour...
We need to find a really hot sexy girls voice for the top of the hour sound...
samspoon said:
here translate this txt file. I used magicks to strip the text from the smali files and removed duplicate lines. Instead of 431 lines to translate I brought it down to 296.
Format your translation like such so I can easily script it:
"THISISTHEUTFSTUFF"~"THISISTHETRANSLATEDSTRING"
For example:
"\u672c\u5730\u78c1\u76d8(C"~"Local Disk (C"
Once this is done I can inject this fairly easily back into the apk.
Click to expand...
Click to collapse
Wait explain, what did you do and where did this come from
Stalte said:
Wait explain, what did you do and where did this come from
Click to expand...
Click to collapse
Linux is your friend!
hotrodownloads sampson$ apktool d AndroidWindows7.apk
hotrodownloads sampson$ cd AndroidWindows7/smali/App/Windows7
hotrod:AndroidWindows7 sampson$ for i in $( ls ); do grep -e "const-string" $i | fgrep "\u" | sed -e "s/const-string v[0-9], //" >> ~/Translation;done
hotrod:AndroidWindows7 sampson$ cd ~
hotrod:~ sampson$ sed -i -e "s/ "/"/" Translation
hotrod:~ sampson$ awk '!x[$0]++' Translation > Translation.txt
hotrod:~ sampson$ cat Translation|wc -l
431
hotrod:~ sampson$ cat Translation.txt |wc -l
296
hotrod:~ sampson$ vim Translation.txt
hotrod:~ sampson$
Had to pretty up translation.txt a little bit because it missed 2 const-strings but can't win them all.
Ok I finished the organizing and I'm about to start the translating I would like to see everyone who loves this pitch in a little bit and i mean with the translating.
@samspoon
If I could get you all of the strings and there translations could you do your quick trick to put them back into the apk??
Woops - forgot to search recursively... Missed a *ton* of ****
and yeah... There's some caveats though... the \n thing and if there are "s you need to keep the utf code and not use the " or it breaks the app. Aside from that works gravy... I'll have a rough google translated version up in a bit as well as all the missed strings
580 strings :\
Man, I wish I was as half as smart as you guys. Then I could be of some assistance. Im going to hang a picture up in my house with candles burning on both sides of you guys if you get this working.
Sent from my top secret hand held device. (first of all....hand held)
samspoon said:
Woops - forgot to search recursively... Missed a *ton* of ****
and yeah... There's some caveats though... the \n thing and if there are "s you need to keep the utf code and not use the " or it breaks the app. Aside from that works gravy... I'll have a rough google translated version up in a bit as well as all the missed strings
580 strings :\
Click to expand...
Click to collapse
Are these all the strings for the entire app
Here's a really rough translation... pretty much enough to let you play around with it.
Honestly I don't even know if this is worth translating considering you have to pay them to get full features. Sure, I could patch the software to work without registering but that isn't very legal.
Also looks like I missed a few strings. Tell me if you want to keep going on
samspoon said:
Here's a really rough translation... pretty much enough to let you play around with it.
Honestly I don't even know if this is worth translating considering you have to pay them to get full features. Sure, I could patch the software to work without registering but that isn't very legal.
Also looks like I missed a few strings. Tell me if you want to keep going on
Click to expand...
Click to collapse
Are you serious you have to pay for it??? Damn I'm about to jump ship over that one
Keep going. Has enough features to be useful.
Sent from my top secret hand held device. (first of all....hand held)
noxiouskill said:
Keep going. Has enough features to be useful.
Sent from my top secret hand held device. (first of all....hand held)
Click to expand...
Click to collapse
Ok ok still going but could someone get me a cracked version because i'm about to spend 6 hours on this thing and I would at least like the full version for myself
Edit: 3 down 117 to go
Stalte said:
Ok ok still going but could someone get me a cracked version because i'm about to spend 6 hours on this thing and I would at least like the full version for myself
Edit: 3 down 117 to go
Click to expand...
Click to collapse
To get any crack version lets get the must important things first n thats a English version to let evryone used it n than someone will get there hands on it n it's easier to make any mods or crack versions etc....even though it does have a pay version. These version still got alot of features. N its still useful
Sent from my PC36100 using XDA App