Skip to content

Commit

Permalink
Add CFBundleLocalizations to Info.plist.
Browse files Browse the repository at this point in the history
This is required for Cocoa to understand what localizations there are.
Even though wxWidgets library works without it, e.g. Sparkle won't show
non-English UI unless [one of] the user's preferred language is listed
in CFBundleLocalizations.
  • Loading branch information
vslavik committed Sep 3, 2012
1 parent 58ad3ef commit 9679ac6
Show file tree
Hide file tree
Showing 2 changed files with 103 additions and 3 deletions.
22 changes: 21 additions & 1 deletion locales/update-translation-lists.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,30 @@ for i in list:

update_makefile_am()
{
echo updating Makefile.am...
echo "updating Makefile.am..."
replace_str Makefile.am \
'\(POEDIT_LINGUAS = \).*' "\1$LANGS_POEDIT"
}


INFO_PLIST=../macosx/Info.plist.in

generate_info_plist()
{
sed -n -e '1,/begin localizations list/ p' $INFO_PLIST
for lang in $LANGS_POEDIT ; do
echo " <string>$lang</string>"
done
sed -n -e '/end localizations list/,$ p' $INFO_PLIST
}

update_info_plist()
{
echo "updating Info.plist.in..."
generate_info_plist >$INFO_PLIST.new
mv -f $INFO_PLIST.new $INFO_PLIST
}


update_makefile_am
update_info_plist
84 changes: 82 additions & 2 deletions macosx/Info.plist.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
<key>CFBundleName</key>
<string>Poedit</string>

<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>Poedit</string>
<key>CFBundleIconFile</key>
Expand Down Expand Up @@ -61,5 +59,87 @@
</dict>
</array>

<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleLocalizations</key>
<array>
<!-- begin localizations list -->
<string>af_ZA</string>
<string>am</string>
<string>ar</string>
<string>ast</string>
<string>be</string>
<string>be@latin</string>
<string>bg</string>
<string>bn</string>
<string>br</string>
<string>bs</string>
<string>ca</string>
<string>ca@valencia</string>
<string>ckb</string>
<string>cs</string>
<string>da</string>
<string>de</string>
<string>el</string>
<string>en_GB</string>
<string>eo</string>
<string>es</string>
<string>es_PR</string>
<string>et</string>
<string>eu</string>
<string>fa_IR</string>
<string>fi</string>
<string>fr</string>
<string>fur</string>
<string>ga</string>
<string>gl</string>
<string>he</string>
<string>hi</string>
<string>hr</string>
<string>hu</string>
<string>id</string>
<string>is</string>
<string>it</string>
<string>ja</string>
<string>ka</string>
<string>kk</string>
<string>ko</string>
<string>ku</string>
<string>ky</string>
<string>lt</string>
<string>lv</string>
<string>mk</string>
<string>mn</string>
<string>mr</string>
<string>ms</string>
<string>nb</string>
<string>nl</string>
<string>nn</string>
<string>pa</string>
<string>pl</string>
<string>pt</string>
<string>pt_BR</string>
<string>ro</string>
<string>ru</string>
<string>sk</string>
<string>sl</string>
<string>sq</string>
<string>sr</string>
<string>sv</string>
<string>ta</string>
<string>tg</string>
<string>th</string>
<string>tr</string>
<string>tt</string>
<string>ug</string>
<string>uk</string>
<string>ur</string>
<string>uz</string>
<string>vi</string>
<string>wa</string>
<string>zh_CN</string>
<string>zh_TW</string>
<!-- end localizations list -->
</array>
</dict>
</plist>

0 comments on commit 9679ac6

Please sign in to comment.