[Q] Import dictionary to ICS stock keyboard - Nexus S Q&A, Help & Troubleshooting

Hi, I'm using ICS stock keyboard cause I find it the most accurate and fast keyboard so far (in my opinion of course).
It has a bit clumsy way to change language but it's ok.
My main problem is it doesn't have Hebrew dictionary in it, and the only way I found to add words is 1 by 1.
Does anyone know of a way to import dictionary or mass add or something ?
My NS is open and rooted, so there's no problem with that.
P.S: I would be glad if you won't suggest me other keyboards and try to help me with this one, thanks

best i could find http://forum.xda-developers.com/showthread.php?t=1369148

sean1984 said:
best i could find http://forum.xda-developers.com/showthread.php?t=1369148
Click to expand...
Click to collapse
Thanks for your time, but it didn't help me much :\
I prefer to stay with the stock keyboard and not to download a modified one.
I downloaded the "ICS keyboard user dictionary" from the market:
https://market.android.com/details?...kLmxhdGluLnByb3ZpZGVycy51c2VyZGljdGlvbmFyeSJd
and when I press at the keyboard settings on personal dictionary it gives me a choice to choose it, but when I choose it, it's the same as the stock personal dictionary, also add words 1 by 1.
Any other suggestions ? It's funny cause technically it doesn't sounds too complex to just import words to the dictionary, is there any system file I can do it with ?

maybe this? http://forum.xda-developers.com/showthread.php?t=647009

I'm sorry but I don't understand, where exactly do I find the stock keyboard udm\udb file, and if I do find it, how can I edit it and add bunch of words at once ?

Bump. Is there any way to add dictionary to stock keyboard. Maybe a dictionary from swiftkeyx? (Finnish dictionary)

I'd be willing to attempt to tackle this, since I do this in my personal build with the English dictionary file, but I do not know where to locate the proper file for the languages requested. I downloaded the SwiftKey X files for Suomi (to see if this is possible), but it appears that SKX uses a different format. I don't know how feasible that route will be...
Google downloads its dictionary files onto the phone from http://www.gstatic.com/android/keyboard/dictionarypack/XX_general.dict (where XX is the corresponding two letter country/language code, e.g. en_general.dict for English), but I either: don't know the proper country/language code or it simply isn't offered. Hopefully somebody more familiar with this process can chime in.

would also really appreciate if this is possible!

Sorry delete this.

Bumping this up because I need this too and it's so frustrating how nothing comes up when I try to search for it and I always end up unto this thread. So I finally decided to post. :/

I tried to build a swiss-german dialect dictionary for the ICS-Keyboard. There is somewhere a guide about th is from CyanogenMod.
The workflow is like that:
1) Get a so called "text corpus" which means: a lot of text from your language from different sources like books, literature, letters, wikipedia, news. For many languages there are already huge text-corpuses. But you can build your own corpus.
2) Then you need to sort this huge text into one file, i use notepad2 or notepad++ to "search & replace" every space with a newline character, then sort this list alphabetically, then count all word occurencies.
3) Then I use excel to come up with a list with the most used words on top, and with lower frequencies top-down, which looks like that:
Code:
word - frequency
the - 218192
a - 202912
in - 190231
not - 182931
and so on.
4) Then you must built an XML from that list with the following structure:
Code:
<wordlist>
<w f="255">ja</w>
<w f="254">nid</w>
<w f="253">isch</w>
<w f="252">und</w>
<w f="251">so</w>
<w f="250">du</w>
<w f="249">das</w>
...
<w f="1">zwüüsch</w>
<w f="1">zykle</w>
<w f="1">zytte</w>
<w f="1">zyttli</w>
</wordlist>
Notice that the frequency max. is 255 and the min. is 1, so you have to come up with some math to get from your absolute frequencies in the excel-file to the relative frequencies in the XML file. On some how-to guides there are python scripts and stuff like this to automate this, but I preffer excel to do that.
5) So after you finally built your XML you just need the makedict.jar from google to compile a binary file with the extension .dict, which can then be added to the keyboard apk.
Those ar basically the steps, search for some how-to guides to find more accurately explaned steps.

underlines said:
I tried to build a swiss-german dialect dictionary for the ICS-Keyboard. There is somewhere a guide about th is from CyanogenMod.
The workflow is like that:
1) Get a so called "text corpus" which means: a lot of text from your language from different sources like books, literature, letters, wikipedia, news. For many languages there are already huge text-corpuses. But you can build your own corpus.
2) Then you need to sort this huge text into one file, i use notepad2 or notepad++ to "search & replace" every space with a newline character, then sort this list alphabetically, then count all word occurencies.
3) Then I use excel to come up with a list with the most used words on top, and with lower frequencies top-down, which looks like that:
Code:
word - frequency
the - 218192
a - 202912
in - 190231
not - 182931
and so on.
4) Then you must built an XML from that list with the following structure:
Code:
<wordlist>
<w f="255">ja</w>
<w f="254">nid</w>
<w f="253">isch</w>
<w f="252">und</w>
<w f="251">so</w>
<w f="250">du</w>
<w f="249">das</w>
...
<w f="1">zwüüsch</w>
<w f="1">zykle</w>
<w f="1">zytte</w>
<w f="1">zyttli</w>
</wordlist>
Notice that the frequency max. is 255 and the min. is 1, so you have to come up with some math to get from your absolute frequencies in the excel-file to the relative frequencies in the XML file. On some how-to guides there are python scripts and stuff like this to automate this, but I preffer excel to do that.
5) So after you finally built your XML you just need the makedict.jar from google to compile a binary file with the extension .dict, which can then be added to the keyboard apk.
Those ar basically the steps, search for some how-to guides to find more accurately explaned steps.
Click to expand...
Click to collapse
Wow, where ever did you find this? I tried searching for something like this but have had no luck so I opted to post to this thread instead. Will try this as soon as I have free time.
Sent from my Nokia 2700c using Tapatalk 2.

Any progress on this one?
Now with swipe built into the fast 4.2 stock keyboard I'd really like to add Hebrew dictionary.
Sent from my Galaxy Nexus

Related

(Updated) Contacts patch to improve the keyboard quick search

Hi, all
THIS IS NOT AN EVIL PATCH!
Update info
Fix bug in updatedb.sh which leads to ignore contacts who have not email.
Summary
After applying the patch, you can quick search "Michael Jeffrey Jordan ([email protected])" in Contacts by keyboard with the preceding chars of the following keywords:
mjjordan
michaeljeffreyjordan
jefferyjordan
jordan
airjordan
That means the patch adds email and abbreviation into quick search path and remove the requirement of SPACE from the name search.
For the people who use Non-Latin language, this is really a mush-have patch. You can quich search contacts by inputing Latin words of the contacts' names/abbreviations. Supports Simplified Chinese, Traditional Chinese, Japanese, Russian, Greek and more. Check data/patch/config in the zip attachment to get full list.
Installation
First, copy contacts-patch.zip to sdcard and rename to update.zip. Then power off, home+power to boot, alt+s to apply the patch, and home+back to reboot.
Second, edit /data/patch/config. Uncomment the transliterator you need. The default config is no transliterator. Latin language user can use the default config.
Third, in terminal, run the following commands:
Code:
su
/data/patch/updatedb.sh
Finally, enjoy the patch!
how easy is it to uninstall if desired?
Has anyone tried this yet that can recommend it?
Thanks!
uninstallation is reapplying JF's update.zip.
ei8htohms said:
Has anyone tried this yet that can recommend it?
Thanks!
Click to expand...
Click to collapse
Many users from China have tried it. They love it very much.
OK, fired it up
Hello sunner and all,
I downloaded and installed per instructions and it seems to work great. Basically improves the regular contacts program's searchability significantly. I already have StarContact installed for one handed searching, and the searching tricks seem to be similar, but with the hard keyboard you have to weed through a lot fewer guesses based on what you've input (StarContact uses a T9-like virtual keypad).
I can't promise that it didn't do anything sinister to my phone, but it doesn't seem to have and so far works great. Thanks and nice job!
_john
Nice work! Thanks for share!

[APP][WIP] Android Windows 7 [The Translation]

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

Great 3D chinese launcher [Plz Translate]

hey guys yesterday i found this cool launcher ...
i downloaded it and it works on i9100 miui v4, but the only problem is that i cant understand anything in it
plz guys I need someone can translate this launcher
{
"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"
}
YOU CAN DOWNLOAD IT FROM HERE
Edit: Thankfully SifJar is working now on the translation.
The majority of it is now translated (to a degree). Only weather (and cities) are Chinese + the choices are limited to chinese cities
Download Latest Translated version HERE
Looks like a kinda nice launcher. I took a look to try and see how much work it would be to do a translation: I used grep to search in res\layout for "text" (which will generally be followed by something needing translated), and there is quite a bit needing translated by the looks of things.
EDIT: About 128 phrases.
EDIT: There is also array.xml and strings.xml in res\values. I've done both of them, there wasn't much there:
array.xml: https://www.dropbox.com/s/yl6hru5wap17ld5/arrays.xml
strings.xml: https://www.dropbox.com/s/24n0t6pdc4in9gd/strings.xml
rough list of stuff needing translated in res\layout: https://www.dropbox.com/s/td30sfgk3waijiw/grep.txt
There are also a few images in res\drawable that contain Chinese characters
EDIT: If I have time at some stage, I may try to translate some more of it. Don't have time right now, but it does seem like a nice launcher.
thx man ! ...
however, to noobs like me, what does all this mean ?
if you can recompile the apk and reupload a translated/semi-translated version it would be really cool
I tried to recompile it, but I must have done it wrong because it won't install...
EDIT: Think I need to sign it, I'll figure that bit out tomorrow. Never done this sort of thing before, so I didn't realise I had to do that.
EDIT: OK, here is a very early version: {link gone, see first post for current link}
The only noticeable difference is the title of the app now shows as "Nine Latitude 3D" which seems to be the right name I think. There are a few other bits and pieces translated (e.g. some weather stuff), but I can't find where they are displayed.
I will try and do some work on this tomorrow if I find time and present a progress update within 24 hours.
EDIT: Note that translation will be done using Google Translate, as I don't speak Chinese. I'll make educated guesses based on the results as to what each string should read, but some may be inaccurate.
Very nice man... Thx for your time
Sent from my GT-I9100 using Tapatalk 2
Randomly came across this and find this launcher very interesting! Would definitely love for this to be translated into English! May even have a little gift for that person! :beer:
Sent from my SGH-I777 using xda premium
SifJar said:
I tried to recompile it, but I must have done it wrong because it won't install...
EDIT: Think I need to sign it, I'll figure that bit out tomorrow. Never done this sort of thing before, so I didn't realise I had to do that.
EDIT: OK, here is a very early version: https://www.dropbox.com/s/7rwqqe10kymggtz/nine_latitude_3d.apk
The only noticeable difference is the title of the app now shows as "Nine Latitude 3D" which seems to be the right name I think. There are a few other bits and pieces translated (e.g. some weather stuff), but I can't find where they are displayed.
I will try and do some work on this tomorrow if I find time and present a progress update within 24 hours.
EDIT: Note that translation will be done using Google Translate, as I don't speak Chinese. I'll make educated guesses based on the results as to what each string should read, but some may be inaccurate.
Click to expand...
Click to collapse
Thanks for the translation.
Can you please put the english xmls on values folder and the original(chinesse) on values-cn(or whatever code used for chinesse), because if the device is setting to another language than english, the chinesse xmls used.
nice find
keep us update PLS
Need translation .
Sent from my HTC Wildfire S A510e
dancer_69 said:
Thanks for the translation.
Can you please put the english xmls on values folder and the original(chinesse) on values-cn(or whatever code used for chinesse), because if the device is setting to another language than english, the chinesse xmls used.
Click to expand...
Click to collapse
OK, will do that from now on. Will hopefully have a bit more translated today, and so will do as you suggested with the next release. This is my first time translating, so I wasn't completely sure exactly what way it should be done. Thanks for the advice.
EDIT: Translated about 30 more strings or thereabouts, should probably get this "finished" today (I say "finished" because it won't be a great translation, and will probably take a bit of trial and error still to come up with more accurate translations)
EDIT: There are a few more strings that I initially thought, but I should still be able to do this today I reckon.
Finished translating everything in \res I can find. But it seems most stuff must be in smali or something I guess (anyone a bit experienced know if this could be right?). There is still a fair bit in Chinese here.
Anyway, here's the current link: {link removed, see first post for current link}
I'll try and look into smali, but there are a LOT of .smali files in this, and I don't even know where to start. But I will have a look and see if I can figure out a bit more. From all the smali files I have looked at so far, there is no Chinese in any of them. So I don't really know where all the rest of the Chinese is.
EDIT: I don't know very much about smali files, but I have found that lines like this one are Chinese:
Code:
const-string v1, "\u6b63\u5728\u4e0b\u8f7d,\u8bf7\u7a0d\u540e..."
I have managed to work out how to convert this to Chinese (and then I can translate to English), but it is a very laborious process requiring to convert each character individually, certainly with the tools I have found so far.
EDIT: Unless I can find a better way to do this, I'll post instructions for what I've worked out so far and give up personally. I don't really have time to spend translating like this.
thanks a lot for your work and time
Little bit translation. OK thanks . I have few problems like galary , music Widgets not working.
Sent from my HTC Wildfire S A510e
idhbar said:
Little bit translation. OK thanks . I have few problems like galary , music Widgets not working.
Sent from my HTC Wildfire S A510e
Click to expand...
Click to collapse
Those problems aren't anything to do with me. They don't work without the translation either (for me, at least).
In case people miss my above post, I have figured out how to translate more, but it is a very long drawn out process, which isn't worth the hassle for me at least, so unless I find a much better way to do this, I will probably give up soon. But I will post directions for said long drawn out process in case anyone else wants to continue where I leave off.
@sifjar I know the widget prob associated with launcher , no relation with translation. Thanks again for your great effort . Anyone facing the widget problem ?
Sent from my HTC Wildfire S A510e
OK, so I'm done with translating this I am afraid. The translation of the .smali files is just far too long and laborious a process, especially when I don't really want the launcher that badly. I was doing this more as an experience building exercise, sort to "see if I could", and I now know that I could but it would be a lot of effort. Anyway, as promised, here is a tutorial for translating the .smali files, and hence the rest of the launcher.
EDIT: This method is slightly more difficult and laborious than necessary. See my post on the next page for a simpler method which encompasses steps 9+10.
Requirements
Android SDK installed
apktool - https://code.google.com/p/android-apktool/
grep - http://gnuwin32.sourceforge.net/packages/grep.htm
Decent text editor e.g. Notepad++
A few sites linked below
The latest copy of my partial translation (see above)
Guide
1. Setup apktool and grep properly so you can run them from the command line anywhere you want.
2. Open a command line where you have the APK of the launcher.
3. Run this command:
Code:
apktool d nine_latitude_3d.apk
4. Navigate into the nine_latitude_3d.apk folder created
5. Navigate into the smali folder inside that one
6. Open a command prompt and use the following command:
Code:
grep string *.smali > results.txt
7. Open results.txt in Notepad++. This file will show you which .smali files contain strings, and what those strings are. You're interested in ones which look like this:
Code:
const-string v1, "\u6b63\u5728\u4e0b\u8f7d,\u8bf7\u7a0d\u540e..."
8. Open the .smali file containing the first string you found, then use Ctrl+F to find that first string
9. Now you need to convert that string into Chinese. Each Chinese character is represented by a hexadecimal number, seperated by \u. So in the above example, the first character is the hexadecimal number 0x6b63 [0x just indicates this is a hex number, you can ignore this, I just put it there to be more "correct"]. To convert to Chinese, you need the number in decimal. You can convert between hex and decimal here: http://www.statman.info/conversions/hexadecimal.html - copy the hex number into the box and click "to decimal". In this example, it is 27491.
10. You can convert from decimal to Chinese character here: http://www.chinese-tools.com/tools/converter-unichar.html - you need to put &# before each decimal number and ; after each. You can convert more than one at a time. So for my above example string, I would convert each number to decimal and end up with this:
Code:
&# 27491;&# 22312;&# 19979;&# 36733,&# 35831;&# 31245;&# 21518
but without the spaces (if I don't put the spaces, the forum automatically converts them to Chinese
(note that when there is a comma between characters, a semi-colon is not necessary)
11. This will give you a Chinese string such as the following:
Code:
正在下载,请稍后
Translate this with Google Translate or whatever to get something like this:
Code:
Downloading, please wait
12. Back in your .smali file replace the string, so the end result would be something like this:
Code:
const-string v1, "Downloading, please wait..."
13. Repeat steps 8-12 for every string found in the first .smali file
14. Repeat steps 8-13 for every .smali file where a string was found
15. Navigate into the first sub folder of the smali folder ("a") and repeat steps 6-14, translating every string
16. Do the same for all the other sub folders of the smali folder
17. Once you have translated every string in every smali file, navigate back out of the smali folder and then back out of the nine_latitude_3d folder
18. Open a command window and type the following:
Code:
apktool b nine_latitude_3d nine_latitude_eng.apk
19. Sign nine_latitude_eng.apk
20. Test the APK and hope it works
Like I said, it is very laborious. Considering there are probably at least a few hundred strings, and each takes maybe a minute or two (compared to the strings in the XMLs in \res\layout, which took a few seconds each), it would take many hours to complete the translation.
SifJar said:
Finished translating everything in \res I can find. But it seems most stuff must be in smali or something I guess (anyone a bit experienced know if this could be right?). There is still a fair bit in Chinese here.
Anyway, here's the current link: https://www.dropbox.com/s/ozhy41i4tpd0occ/nine_latitude_eng.apk
I'll try and look into smali, but there are a LOT of .smali files in this, and I don't even know where to start. But I will have a look and see if I can figure out a bit more. From all the smali files I have looked at so far, there is no Chinese in any of them. So I don't really know where all the rest of the Chinese is.
EDIT: I don't know very much about smali files, but I have found that lines like this one are Chinese:
Code:
const-string v1, "\u6b63\u5728\u4e0b\u8f7d,\u8bf7\u7a0d\u540e..."
I have managed to work out how to convert this to Chinese (and then I can translate to English), but it is a very laborious process requiring to convert each character individually, certainly with the tools I have found so far.
EDIT: Unless I can find a better way to do this, I'll post instructions for what I've worked out so far and give up personally. I don't really have time to spend translating like this.
Click to expand...
Click to collapse
I can help you.......!! I have a good knowledge in xmls and somewhat in smali......i can join you in translating....maybe i'll join you by monday!!! I am not a chineese too.....we can try n bring out fantastic launcher!!
What do you think??
balamu96m said:
I can help you.......!! I have a good knowledge in xmls and somewhat in smali......i can join you in translating....maybe i'll join you by monday!!! I am not a chineese too.....we can try n bring out fantastic launcher!!
What do you think??
Click to expand...
Click to collapse
I decided to run a little test. I set grep to search for \u, which appears in every string needing translated. I made it search in all the sub folders of smali. The resultant results.txt was 302 lines long. i.e. there are about 302 strings needing translated. This is far too huge a task for me to take on. If you want to do it, go ahead, but I'm afraid I simply don't have time.
EDIT: I might try and make a script to automate the process, somewhat at least.
SifJar said:
I decided to run a little test. I set grep to search for \u, which appears in every string needing translated. I made it search in all the sub folders of smali. The resultant results.txt was 302 lines long. i.e. there are about 302 strings needing translated. This is far too huge a task for me to take on. If you want to do it, go ahead, but I'm afraid I simply don't have time.
EDIT: I might try and make a script to automate the process, somewhat at least.
Click to expand...
Click to collapse
Finding out the no. of strings to be translated is a great step!!
Translating is using google translate only na??
Why not share work??
I'll try to translate at least 15 strings a day...u too try the same....at the end of 10 days we would have completed translating!!
If you can make a script, it will be great!!
Also, in the launcher, how to go to the app drawer?? I can see only running apps??
balamu96m said:
Finding out the no. of strings to be translated is a great step!!
Translating is using google translate only na??
Why not share work??
I'll try to translate at least 15 strings a day...u too try the same....at the end of 10 days we would have completed translating!!
If you can make a script, it will be great!!
Also, in the launcher, how to go to the app drawer?? I can see only running apps??
Click to expand...
Click to collapse
You switch between screens by swiping at the bottom. One of them will show apps. You can change the apps displayed by tapping the circle thing at the right side and choosing one of the other options (it has options for user apps, system apps and I think favourite apps). The apps are displayed on multiple pages within the apps screen, swiping across where the app icons are shown should reveal the rest of your apps. Although I don't think it displays all of my apps, but I haven't checked too thoroughly.
As for translating, I certainly won't be doing anything until I have made a script at the very least (I reckon I should hopefully be able to create a script that will replace all the \uXXXX in the strings with the the corresponding Chinese characters, so that it will just be a copy & paste to Google Translate and back, the way it was with the strings in the XMLs). If I can't get a script like that to work, I probably won't be working on this anymore, sorry.
EDIT: If I do get a script like that to work, it'll take much less time. I did about 120 strings or something like that in about half an hour earlier I think.

[Q] [IDEA] Am I the only one having the idea of this app?

Well, now that you have opened this thread, please have a look at what I want to say.
I am new to HTC Sensation and I have tried some apps which claim to add words from text file to Custom Dictionary. But there are some devices on which it does not work, and, unfortunately this does not work on Sensation either. So, I am having idea of an app which does the task in a new way:
All it should do is to 'read' words one by one from our given text file and then 'type' it in a text editor like New Message. But before it presses 'space', it should touch the first suggestion given above the keyboard. First suggestion is always the word that we originally type, no matter whether it is in dictionary or not. Touching it will add the word to dictionary. I believe that this is easier to apply as this is a manual method and does not require editing database file.
Second method (a bit more technical):
Open given text in a text editor like New Message or New Gmail email (gmail, because it also underlines words which are not in dictionary and supports big number of words). Then touch every word one by one. If a pop-up menu appears on a word then it must select the 'second-last' option. This is 'add to dictionary' button.
I am not a developer, if I were, I would have made this app myself. So I can only give theory.
If this can be applied, it can be useful for many users who use transliteration method to type in their languages.

Extract UI strings from firmware / device

Hi.
Before I start with my question, just a little background. I work in a user guide development firm, and mainly work on Galaxy devices.
One of the most time-consuming process in my work is to match all UI strings (app names, menu text, labels, etc) of the actual device with the user guide.
This is currently being done with human power, with a staff looking at the user guide, check the device if this is correct, and annotate the draft PDF if the UI strings don't match.
If this was for just one language, it's doable. But with 40 or so languages (including Arabic, Cyrillic, Chinese), it definitely makes me want to puke.
This is a very tiring, eye-straining work that I'm trying to resolve, for everyone's sake.
I tried decompressing the Galaxy firmware myself, but the XML data is encoded into binary(for what reason I have no idea), and is not readable.
So now I'm turning to the masters and hope for any luck.
What I would like to know is ...
Hack the Galaxy firmware(md5), and extract UI strings for all language and save in spreadsheet or something, or
Mirror the device's screen on the desktop, copy the desired UI string, and paste it to a desktop application(e.g. Adobe Acrobat).
If the first option is possible, then I can utilize the data for some sort of automation, and would be the best.
If the second option is possible, then I would no longer have to type all kinds of foreign characters(this is also a very time-consuming work), and make some progress in timeline.
If all options are not possible, and there's absolutely no way of automating this process, then well... I guess I'll go see the eye doctor more often than now.
Any ideas or helps would be great.
Thank you.

Categories

Resources