MainMenuStringFixer

I found that I needed to think of a better way to localize my NIBs. I was looking to potentially create some new panes and didn’t want to have to go back through each language’s NIB file and hand tweak those. I Googled around and came across Will Shipley’s excellent article “Lost In Translations”

I will not repeat what he’s written there however I found that his instructions lacked one thing that I already had and needed an additional step for: I needed to grab any of the translations that I already had done and pull them out to a MainMenu.strings file. That was actually easy enough to do with ibtool however the files that are generated come out like

/* Class = "NSTextFieldCell"; title = "Aufgabe:"; ObjectID = "741"; */
"741.title" = "Aufgabe:";

As a reminder I needed to end up with a MainMenu.strings file (in each .lproj) that looked more like this:

"Task:" = "Aufgabe:";

So what I did was modify the mainMenuStringAdapater.m file so that it stores the ObjectID and key text from the English (in my case) MainMenu.strings file, then loads the language-to-be-translated’s-MainMenu.strings file  (passed as parameters) and saves a resultant file out with the corrected MainMenu.Strings file for that language, without the objectIDs as keys.

You should definitely look over the resultant file and confirm that it did what it was supposed to. Additionally It should also dump out a file telling you how many lines were in each MainMenu.strings file and if there were any ObjectIDs in the foreign file that were not accounted for from the English file (and therefore need to be handled in the fixed version).

This was a quick and dirty job and I’m sure there are leaks and such, but I figured it might do someone else some good so I’m sticking it up here.

Categories
.

@ The Dogwalking Park

Categories
.

Dahlia’s Soccer Team

Categories
.

@ Kenny/Anthony’s

Just after performing California Idol!

Categories
.

Beware of Sharks!

@ Universal Studios CA

Categories
.

California’s Flag

Driving around Long Beach last weekend Dahlia exclaims:

“No fair! California gets a rainbow flag!”

Categories
.

Overheard today

Dahlia (to Monti) : “Have you ever tried peppermint?”
Monti: “No”
Dahlia : “It really really really really really pepperminty”

Categories
.

Dahlia wants a new sister

(Dahlia comes downstairs)

Me: What were you doing?

Dahlia : Talking to God and Jesus.

Me: What were you saying?

Dahlia: “God, are Ella and I going to be sisters?”

Me : What did he say?

Dahlia : God say “No”.

Categories
.

Dahlia’s Story Page 1

This is Dahlia’s story. My challenge to you, dear reader, is to read this without consulting my transcription of it (that she read to me) below the picture.

What it says

Once upon a time there was a very quiet cottage. There was two girls named Dahlia and Ella. Ella was bigger. Dahlia was smaller. Ella liked to watch the sun set. Dahlia liked to watch the sun rise. When it was night, Dahlia heard footsteps.

Dahlia yelled “Ella!”

[collapse]
Categories
.

Dahlia’s Story Page 2

Part 2

What it says

Ella runs to Dahlia’s room.

Ella said “What’s wrong?”

I hear the Headless Horseman!

“We need to run!” said Ella.

“But what about our cottage?” said Dahlia

“We maybe be stuck in the woods with the bats and the moths” said Ella

“Now we better hurry!” said Ella

[collapse]