webOS Nation Forums >  Homebrew >  webOS homebrew apps > Habla! English - Spanish Translator [v1.0][NRR]
Habla! English - Spanish Translator [v1.0][NRR]

  Reply
 
LinkBack Thread Tools Display Modes
Old 07/04/2009, 12:39 AM   #1 (permalink)
Member
 
taalibeen's Avatar
 
Join Date: May 2009
Posts: 249
Likes Received: 0
Thanks: 13
Thanked 69 Times in 26 Posts
Default Habla! English - Spanish Translator [v1.0][NRR]

Okay, I know someone already posted a translator application that uses Google translate and allows multiple languages.

However, as one married to a beautiful Puerto Rican woman (straight from the island) who is the only one in her family that really speaks English - I'm often in need of a quick way to figure out how to say something in Spanish, or figure out what some Spanish word is in English.

One of my personal favorite sites to use for such things is wordreference dot com, which gives a much more thorough definition of words than Google translate.

So, inspired by the other app, I set out to make my own application that better suited my needs.

In the end, I was able to create my app called "Habla!"

You can enter a word in either English or Spanish, and it will pull up the definition from wordreference mobile.

Aesthetically, it needs work, but my foremost concern was functionality.

So, here's Habla! v 1.0.

Screenshots:
Attached Images
File Type: jpg test_2009-04-07_011541.jpg (26.7 KB, 556 views) Email Attachment
File Type: jpg test_2009-04-07_011851.jpg (46.8 KB, 690 views) Email Attachment
File Type: jpg test_2009-04-07_012452.jpg (49.1 KB, 440 views) Email Attachment
Attached Files
File Type: zip habla.zip (7.6 KB, 116 views) Email Attachment
File Type: ipk com.ykad.app.habla_1.0_all.ipk (5.3 KB, 890 views) Email Attachment
Download URL:
taalibeen is offline   Reply With Quote
Old 07/04/2009, 12:41 AM   #2 (permalink)
Member
 
Blubble's Avatar
 
Join Date: Jun 2009
Location: Silicon Valley, California
Posts: 1,025
Likes Received: 0
Thanks: 37
Thanked 444 Times in 161 Posts
Default

Cool. Does wordreference.com provide a web service you can use, or do you just do a request and scrape the result page?
Blubble is offline   Reply With Quote
Old 07/04/2009, 12:42 AM   #3 (permalink)
Member
 
taalibeen's Avatar
 
Join Date: May 2009
Posts: 249
Likes Received: 0
Thanks: 13
Thanked 69 Times in 26 Posts
Default

Here's the source code for Habla! v 1.0:
Attached Files
File Type: zip habla.zip (7.6 KB, 50 views) Email Attachment
taalibeen is offline   Reply With Quote
Thanked By: Milominderbinder
Old 07/04/2009, 12:47 AM   #4 (permalink)
Member
 
taalibeen's Avatar
 
Join Date: May 2009
Posts: 249
Likes Received: 0
Thanks: 13
Thanked 69 Times in 26 Posts
Default

If they have a web service, I'm not aware of it.

I'm just using the webview widget, and making the URL a concatenation of the basic search string URL along with the variable that contains whatever text has been entered in the text box.

I've got some ideas on how to improve it, I'll start exploring them another day.

For now though, since my inlaws are here in the US visiting, this app should make it quicker for me to get the words I need to have a meaningful convo.

Grammatically, I know how to structure my thoughts, but sometimes just don't have the words. Google translator comes up with some ridiculous translations sometimes (often), for Spanish anyway.
taalibeen is offline   Reply With Quote
Old 07/04/2009, 01:13 AM   #5 (permalink)
Member
 
Join Date: Jun 2009
Posts: 73
Likes Received: 0
Thanks: 5
Thanked 7 Times in 6 Posts
Default

Hi Taalibeen, I am working on something similar like yours except the meaning of your name and their definitions/origin from the site Zelo.com. Could you help me out please
murdermajig is offline   Reply With Quote
Old 07/04/2009, 01:50 AM   #6 (permalink)
Member
 
taalibeen's Avatar
 
Join Date: May 2009
Posts: 249
Likes Received: 0
Thanks: 13
Thanked 69 Times in 26 Posts
Default

murdermajig, take the source code I provided and in the mainView-assistant.js file where I call the url to pull content into the webview widgget, change the wordreference portion of the URL to "http://www.zelo.com/firstnames/findresults.asp?name="

That will give you a REALLY ROUGH working version, but the problem is trying to pare down the page to just the parts you want, which in your case is the name and the translation, minust the other stuff they have going on in the page.

Of course, you're gonna wanna change the icon, app name, and button lables too.

If anyone knows a better way - please enlighten us!
taalibeen is offline   Reply With Quote
Thanked By: murdermajig
Old 07/04/2009, 02:11 AM   #7 (permalink)
Member
 
Join Date: Jun 2009
Posts: 73
Likes Received: 0
Thanks: 5
Thanked 7 Times in 6 Posts
Default

Thank you so much, now i need to see how to just get the text.
again, thanks!!!!!

Edit: do you know if this uses the ajax get fuction?

Last edited by murdermajig; 07/04/2009 at 02:34 AM. Reason: ajax
murdermajig is offline   Reply With Quote
Old 07/04/2009, 02:38 AM   #8 (permalink)
Member
 
dchamero's Avatar
 
Join Date: Jun 2009
Posts: 73
Likes Received: 0
Thanks: 32
Thanked 6 Times in 5 Posts
Default

Can you make an .ipk package for easy install?
dchamero is offline   Reply With Quote
Old 07/04/2009, 06:26 AM   #9 (permalink)
Member
 
deCorvett's Avatar
 
Join Date: Jul 2006
Location: Zaragoza, Spain
Posts: 1,788
Likes Received: 177
Thanks: 45
Thanked 385 Times in 217 Posts
Default

better use "Traducir" instead of "Busca la palabra".

Suena mejor en espaņol.

(I hope you don't need to translate the last statement.)
deCorvett is online now   Reply With Quote
Old 07/04/2009, 08:48 AM   #10 (permalink)
Member
 
taalibeen's Avatar
 
Join Date: May 2009
Posts: 249
Likes Received: 0
Thanks: 13
Thanked 69 Times in 26 Posts
Default

Quote:
Originally Posted by deCorvett View Post
better use "Traducir" instead of "Busca la palabra".

Suena mejor en espaņol.

(I hope you don't need to translate the last statement.)
Tienes razon, voy a cambiar las dos frases a "Translate / Traducir"

(i'm still annoyed by the fact that the Sym button doesn't work when filling out a form on the web (I.e this forum - I hope Palm fixes that soon)
taalibeen is offline   Reply With Quote
Old 07/04/2009, 10:02 AM   #11 (permalink)
Member
 
taalibeen's Avatar
 
Join Date: May 2009
Posts: 249
Likes Received: 0
Thanks: 13
Thanked 69 Times in 26 Posts
Default

Here is the .ipk if anyone wants to try it.
Attached Files
File Type: ipk com.ykad.app.habla_1.0_all.ipk (5.3 KB, 25 views) Email Attachment
Download URL:
taalibeen is offline   Reply With Quote
Old 07/04/2009, 11:37 AM   #12 (permalink)
Member
 
TreoRock's Avatar
 
Join Date: Mar 2000
Location: CA
Posts: 3,099
Likes Received: 26
Thanks: 350
Thanked 125 Times in 80 Posts
Default

I don't know if this is possible, but is there a way to get pronunciation voice for the words? I think dictionary.com does that.
__________________
TreoRock is offline   Reply With Quote
Old 07/04/2009, 11:37 AM   #13 (permalink)
Member
 
dchamero's Avatar
 
Join Date: Jun 2009
Posts: 73
Likes Received: 0
Thanks: 32
Thanked 6 Times in 5 Posts
Default

Thank you for the IPK!

Now.. would it be possible to enable widescreen mode? because the font on the results windows is tiny... (or to change the font maybe....)
dchamero is offline   Reply With Quote
Old 07/04/2009, 11:38 AM   #14 (permalink)
Member
 
TreoRock's Avatar
 
Join Date: Mar 2000
Location: CA
Posts: 3,099
Likes Received: 26
Thanks: 350
Thanked 125 Times in 80 Posts
Default

Quote:
Originally Posted by dchamero View Post
Thank you for the IPK!

Now.. would it be possible to enable widescreen mode? because the font on the results windows is tiny... (or to change the font maybe....)
I've read on the Xbox app thread that it is only 2 lines of code.
__________________
TreoRock is offline   Reply With Quote
Old 07/04/2009, 01:12 PM   #15 (permalink)
Member
 
taalibeen's Avatar
 
Join Date: May 2009
Posts: 249
Likes Received: 0
Thanks: 13
Thanked 69 Times in 26 Posts
Default

Regarding the fontsize, the Rough Cuts book says there's a minFontSize property that can be set for the webview widget, but doesn't mention how to set it or what the possible values are.

Since I only have the leaked SDK, it doesn't have the full documentation.

I'll take a look at the Xbox app thread and see what I can do in that regard.
taalibeen is offline   Reply With Quote
Old 07/04/2009, 02:19 PM   #16 (permalink)
Member
 
Join Date: Jun 2009
Posts: 73
Likes Received: 0
Thanks: 5
Thanked 7 Times in 6 Posts
Default

Hey Taali, do you think we can replace webview with ajax get?
murdermajig is offline   Reply With Quote
Old 07/04/2009, 02:51 PM   #17 (permalink)
Member
 
TreoRock's Avatar
 
Join Date: Mar 2000
Location: CA
Posts: 3,099
Likes Received: 26
Thanks: 350
Thanked 125 Times in 80 Posts
Default

Quote:
Originally Posted by taalibeen View Post
Regarding the fontsize, the Rough Cuts book says there's a minFontSize property that can be set for the webview widget, but doesn't mention how to set it or what the possible values are.

Since I only have the leaked SDK, it doesn't have the full documentation.

I'll take a look at the Xbox app thread and see what I can do in that regard.
http://forums.precentral.net/1729863-post29.html
__________________
TreoRock is offline   Reply With Quote
Old 07/04/2009, 03:38 PM   #18 (permalink)
Member
 
taalibeen's Avatar
 
Join Date: May 2009
Posts: 249
Likes Received: 0
Thanks: 13
Thanked 69 Times in 26 Posts
Default

Quote:
Originally Posted by murdermajig View Post
Hey Taali, do you think we can replace webview with ajax get?
I'm not that familiar with AJAX, but from what I've seen it should be possible. For those that are more AJAX literate than myself, will using an AJAX get instead of the webwidget in MOJO buy me anything in terms of presentation or ability to extract just the relevant portions of the page?
taalibeen is offline   Reply With Quote
Old 07/04/2009, 04:14 PM   #19 (permalink)
Member
 
taalibeen's Avatar
 
Join Date: May 2009
Posts: 249
Likes Received: 0
Thanks: 13
Thanked 69 Times in 26 Posts
Default

What's driving me nuts is my apparent inability to add a background image to the app.

The background image shows up in the desktop browser, but when I run the app in the emulator or on my Pre, it doesn't display.

Can't figure out what I'm doing wrong.
taalibeen is offline   Reply With Quote
Old 07/04/2009, 04:27 PM   #20 (permalink)
Member
 
Join Date: Jun 2009
Posts: 73
Likes Received: 0
Thanks: 5
Thanked 7 Times in 6 Posts
Default

Quote:
Originally Posted by taalibeen View Post
What's driving me nuts is my apparent inability to add a background image to the app.

The background image shows up in the desktop browser, but when I run the app in the emulator or on my Pre, it doesn't display.

Can't figure out what I'm doing wrong.
I know that one!
go to your stylesheet and type this

Quote:
body.myBackground {
background: url(../images/Image.png) center center;
}
Then go to your scene and type, replace image.png with the image you want

Quote:
<body class="myBackground palm-dark">
and replace the top <body> with this
murdermajig is offline   Reply With Quote
Thanked By: taalibeen
Reply

 

Thread Tools
Display Modes



 


Content Relevant URLs by vBSEO 3.6.0