From eb79c010034b758c79a6fc0ba87060d63752d72c Mon Sep 17 00:00:00 2001 From: Maciej Czerniak Date: Tue, 11 Jun 2013 16:39:33 +0200 Subject: [PATCH 1/4] add missing Norwegian language for linux platform --- cocos2dx/platform/linux/CCApplication.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cocos2dx/platform/linux/CCApplication.cpp b/cocos2dx/platform/linux/CCApplication.cpp index 5ad70949fe..17a512e7d3 100644 --- a/cocos2dx/platform/linux/CCApplication.cpp +++ b/cocos2dx/platform/linux/CCApplication.cpp @@ -160,6 +160,10 @@ ccLanguageType CCApplication::getCurrentLanguage() { ret = kLanguageArabic; } + else if (0 == strcmp("nb", pLanguageName)) + { + ret = kLanguageNorwegian; + } return ret; } From c9b88e1c0c298f3ecea28ee58dc9627f4ef27e5c Mon Sep 17 00:00:00 2001 From: Maciej Czerniak Date: Tue, 11 Jun 2013 16:41:54 +0200 Subject: [PATCH 2/4] add missing Norwegian language for marmelade platform --- cocos2dx/platform/marmalade/CCApplication.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cocos2dx/platform/marmalade/CCApplication.cpp b/cocos2dx/platform/marmalade/CCApplication.cpp index 5258089473..c7631e76de 100644 --- a/cocos2dx/platform/marmalade/CCApplication.cpp +++ b/cocos2dx/platform/marmalade/CCApplication.cpp @@ -193,7 +193,11 @@ ccLanguageType CCApplication::getCurrentLanguage() case S3E_DEVICE_LANGUAGE_ARABIC: currentLanguage = kLanguageArabic; break; - + + case S3E_DEVICE_LANGUAGE_NORWEGIAN: + currentLanguage = kLanguageNorwegian; + break; + default: currentLanguage = kLanguageEnglish; break; From dddb487639fe24a15c548853649a704b814b8526 Mon Sep 17 00:00:00 2001 From: Maciej Czerniak Date: Tue, 11 Jun 2013 16:43:35 +0200 Subject: [PATCH 3/4] fix formatting --- cocos2dx/platform/win32/CCApplication.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos2dx/platform/win32/CCApplication.cpp b/cocos2dx/platform/win32/CCApplication.cpp index 26a26e9683..cd26c14f87 100644 --- a/cocos2dx/platform/win32/CCApplication.cpp +++ b/cocos2dx/platform/win32/CCApplication.cpp @@ -151,7 +151,7 @@ ccLanguageType CCApplication::getCurrentLanguage() case LANG_ARABIC: ret = kLanguageArabic; break; - case LANG_NORWEGIAN: + case LANG_NORWEGIAN: ret = kLanguageNorwegian; break; } From 1e71ea85f35819975124a049faf9bc8504f67f1b Mon Sep 17 00:00:00 2001 From: Maciej Czerniak Date: Tue, 11 Jun 2013 16:46:38 +0200 Subject: [PATCH 4/4] add Polish language support --- cocos2dx/platform/CCCommon.h | 3 ++- cocos2dx/platform/android/CCApplication.cpp | 6 +++++- cocos2dx/platform/blackberry/CCApplication.cpp | 4 ++++ cocos2dx/platform/ios/CCApplication.mm | 3 +++ cocos2dx/platform/linux/CCApplication.cpp | 4 ++++ cocos2dx/platform/mac/CCApplication.mm | 5 ++++- cocos2dx/platform/marmalade/CCApplication.cpp | 4 ++++ cocos2dx/platform/tizen/CCApplication.cpp | 4 ++++ cocos2dx/platform/win32/CCApplication.cpp | 3 +++ 9 files changed, 33 insertions(+), 3 deletions(-) diff --git a/cocos2dx/platform/CCCommon.h b/cocos2dx/platform/CCCommon.h index b1f6ed45bd..01acac9a1a 100644 --- a/cocos2dx/platform/CCCommon.h +++ b/cocos2dx/platform/CCCommon.h @@ -69,7 +69,8 @@ typedef enum LanguageType kLanguageHungarian, kLanguagePortuguese, kLanguageArabic, - kLanguageNorwegian + kLanguageNorwegian, + kLanguagePolish } ccLanguageType; // end of platform group diff --git a/cocos2dx/platform/android/CCApplication.cpp b/cocos2dx/platform/android/CCApplication.cpp index 3fbea89a1b..315904bd79 100644 --- a/cocos2dx/platform/android/CCApplication.cpp +++ b/cocos2dx/platform/android/CCApplication.cpp @@ -118,7 +118,11 @@ ccLanguageType CCApplication::getCurrentLanguage() else if (0 == strcmp("nb", pLanguageName)) { ret = kLanguageNorwegian; - } + } + else if (0 == strcmp("pl", pLanguageName)) + { + ret = kLanguagePolish; + } return ret; } diff --git a/cocos2dx/platform/blackberry/CCApplication.cpp b/cocos2dx/platform/blackberry/CCApplication.cpp index dc54edeab2..5f85d01911 100644 --- a/cocos2dx/platform/blackberry/CCApplication.cpp +++ b/cocos2dx/platform/blackberry/CCApplication.cpp @@ -165,6 +165,10 @@ ccLanguageType CCApplication::getCurrentLanguage() else if (strcmp(language, "nb") == 0) { ret_language = kLanguageNorwegian; + } + else if (strcmp(language, "pl") == 0) + { + ret_language = kLanguagePolish; } free(language); free(country); diff --git a/cocos2dx/platform/ios/CCApplication.mm b/cocos2dx/platform/ios/CCApplication.mm index 1101580612..0335c6b919 100644 --- a/cocos2dx/platform/ios/CCApplication.mm +++ b/cocos2dx/platform/ios/CCApplication.mm @@ -122,6 +122,9 @@ ccLanguageType CCApplication::getCurrentLanguage() else if ([languageCode isEqualToString:@"nb"]){ ret = kLanguageNorwegian; } + else if ([languageCode isEqualToString:@"pl"]){ + ret = kLanguagePolish; + } return ret; } diff --git a/cocos2dx/platform/linux/CCApplication.cpp b/cocos2dx/platform/linux/CCApplication.cpp index 17a512e7d3..c5115cf366 100644 --- a/cocos2dx/platform/linux/CCApplication.cpp +++ b/cocos2dx/platform/linux/CCApplication.cpp @@ -164,6 +164,10 @@ ccLanguageType CCApplication::getCurrentLanguage() { ret = kLanguageNorwegian; } + else if (0 == strcmp("pl", pLanguageName)) + { + ret = kLanguagePolish; + } return ret; } diff --git a/cocos2dx/platform/mac/CCApplication.mm b/cocos2dx/platform/mac/CCApplication.mm index e8c5ada33a..a7ae2352be 100755 --- a/cocos2dx/platform/mac/CCApplication.mm +++ b/cocos2dx/platform/mac/CCApplication.mm @@ -129,7 +129,10 @@ ccLanguageType CCApplication::getCurrentLanguage() } else if ([languageCode isEqualToString:@"nb"]){ ret = kLanguageNorwegian; - } + } + else if ([languageCode isEqualToString:@"pl"]){ + ret = kLanguagePolish; + } return ret; } diff --git a/cocos2dx/platform/marmalade/CCApplication.cpp b/cocos2dx/platform/marmalade/CCApplication.cpp index c7631e76de..24502dfa79 100644 --- a/cocos2dx/platform/marmalade/CCApplication.cpp +++ b/cocos2dx/platform/marmalade/CCApplication.cpp @@ -198,6 +198,10 @@ ccLanguageType CCApplication::getCurrentLanguage() currentLanguage = kLanguageNorwegian; break; + case S3E_DEVICE_LANGUAGE_POLISH: + currentLanguage = kLanguagePolish; + break; + default: currentLanguage = kLanguageEnglish; break; diff --git a/cocos2dx/platform/tizen/CCApplication.cpp b/cocos2dx/platform/tizen/CCApplication.cpp index 9ad61c9d0d..6cd9bdef1a 100644 --- a/cocos2dx/platform/tizen/CCApplication.cpp +++ b/cocos2dx/platform/tizen/CCApplication.cpp @@ -142,6 +142,10 @@ ccLanguageType CCApplication::getCurrentLanguage() { ret = kLanguageNorwegian; } + else if (0 == languageCode.CompareTo(L"pol")) + { + ret = kLanguagePolish; + } return ret; } diff --git a/cocos2dx/platform/win32/CCApplication.cpp b/cocos2dx/platform/win32/CCApplication.cpp index cd26c14f87..c1d6c51f14 100644 --- a/cocos2dx/platform/win32/CCApplication.cpp +++ b/cocos2dx/platform/win32/CCApplication.cpp @@ -154,6 +154,9 @@ ccLanguageType CCApplication::getCurrentLanguage() case LANG_NORWEGIAN: ret = kLanguageNorwegian; break; + case LANG_POLISH: + ret = kLanguagePolish; + break; } return ret;