martnst / localize-mainmenu

Commandline tool that localizes the common main menu items of an OS X app automatically.
MIT License
42 stars 12 forks source link

App name not detected so not translated #13

Open Arc676 opened 7 years ago

Arc676 commented 7 years ago

I'm not sure if this is expected behavior or if I'm just using the command incorrectly.

I exported to XLIFF and ran localize-mainmenu de.xliff de_done.xliff and got these warnings:

no 'de' translation found for key 'Crystal Ball Mac' in file 'Crystal Ball Mac/Base.lproj/Main.storyboard'
no 'de' translation found for key 'Quit Crystal Ball Mac' in file 'Crystal Ball Mac/Base.lproj/Main.storyboard'
no 'de' translation found for key 'About Crystal Ball Mac' in file 'Crystal Ball Mac/Base.lproj/Main.storyboard'
no 'de' translation found for key 'Main Menu' in file 'Crystal Ball Mac/Base.lproj/Main.storyboard'
no 'de' translation found for key 'Crystal Ball Mac Help' in file 'Crystal Ball Mac/Base.lproj/Main.storyboard'
no 'de' translation found for key 'Hide Crystal Ball Mac' in file 'Crystal Ball Mac/Base.lproj/Main.storyboard'
no 'de' translation found for key 'Data Detectors' in file 'Crystal Ball Mac/Base.lproj/Main.storyboard'
no 'de' translation found for key 'Crystal Ball Mac' in file 'Crystal Ball Mac/Base.lproj/Main.storyboard'

Is there a way to let localize-mainmenu know what the app name is so it can translate words like 'Hide' and 'Quit'?

martnst commented 7 years ago

Hi @Arc676, have you tried the --appname option?

Arc676 commented 7 years ago

I tried localize-mainmenu de.xliff de_done.xliff --appname 'Crystal Ball Mac' and I got the same output.

martnst commented 7 years ago

Okay strange. I tried to reproduce it with my macOS app without success. Could you email your de.xliff?

Arc676 commented 7 years ago

I've attached the XLIFF file in a ZIP. de.xliff.zip

I'm thinking it might have something to do with targets? Crystal Ball Mac is the Mac target in a project that also includes an iOS target named Crystal Ball.

martnst commented 7 years ago

I get this output running it with your de.xliff:

$ localize-mainmenu de.xliff de_done.xliff --appname 'Crystal Ball Mac'
no 'de' translation found for key 'Crystal Ball Mac' in file 'Crystal Ball Mac/Base.lproj/Main.storyboard'
no 'de' translation found for key 'Main Menu' in file 'Crystal Ball Mac/Base.lproj/Main.storyboard'
no 'de' translation found for key 'Crystal Ball Mac Help' in file 'Crystal Ball Mac/Base.lproj/Main.storyboard'
no 'de' translation found for key 'Data Detectors' in file 'Crystal Ball Mac/Base.lproj/Main.storyboard'
no 'de' translation found for key 'Crystal Ball Mac' in file 'Crystal Ball Mac/Base.lproj/Main.storyboard'