localize-mainmenu icon indicating copy to clipboard operation
localize-mainmenu copied to clipboard

App name not detected so not translated

Open Arc676 opened this issue 6 years ago • 5 comments

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'?

Arc676 avatar Sep 01 '17 09:09 Arc676

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

martnst avatar Sep 02 '17 17:09 martnst

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

Arc676 avatar Sep 03 '17 06:09 Arc676

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

martnst avatar Sep 03 '17 11:09 martnst

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.

Arc676 avatar Sep 03 '17 13:09 Arc676

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'

martnst avatar Sep 03 '17 15:09 martnst