Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[INSD-9439] Add New Locales #979

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
# Changelog

## [Unreleased](https://github.com/Instabug/Instabug-React-Native/compare/v11.10.0...dev)

### Added

- Add support for more locales ([#979](https://github.com/Instabug/Instabug-React-Native/pull/979)):
1. Bulgarian
2. Croatian
3. Estonian
4. Greek
5. Latvian
6. Lithuanian
7. Serbian
8. Slovenian
9. Ukrainian

### Fixed

- Fix an issue with the Android sourcemaps upload script, causing the build to fail on older versions of Gradle ([#970](https://github.com/Instabug/Instabug-React-Native/pull/970)), closes [#969](https://github.com/Instabug/Instabug-React-Native/issues/969).
- Fix an issue with the Android sourcemaps upload script, causing the build to fail when using product flavors ([#975](https://github.com/Instabug/Instabug-React-Native/pull/975)), closes [#974](https://github.com/Instabug/Instabug-React-Native/issues/974).

## [11.10.0](https://github.com/Instabug/Instabug-React-Native/compare/v11.9.1...11.10.0) (April 20, 2023)

### Added
Expand Down
3 changes: 2 additions & 1 deletion RNInstabug.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ Pod::Spec.new do |s|
s.source_files = "ios/**/*.{h,m,mm}"

s.dependency 'React-Core'
use_instabug!(s)
s.dependency 'Instabug'
# use_instabug!(s)
end
2 changes: 1 addition & 1 deletion android/native.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
project.ext.instabug = [
version: '11.11.0'
version: '11.11.0.4909006-SNAPSHOT'
]

dependencies {
Expand Down
4 changes: 2 additions & 2 deletions android/sourcemaps.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import org.apache.tools.ant.taskdefs.condition.Os
def appProject = project(":app")

gradle.projectsEvaluated {
// Works for both `bundleReleaseJsAndAssets` and `createBundleReleaseJsAndAssets`
// Works for both `bundleReleaseJsAndAssets` and `createBundleReleaseJsAndAssets` and product flavors
def bundleTask = appProject.tasks.find {
task -> task.name.endsWithIgnoreCase('bundleReleaseJsAndAssets')
task -> task.name.endsWith('ReleaseJsAndAssets')
}

bundleTask.finalizedBy uploadSourcemaps
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,28 +163,37 @@ static Map<String, Object> getAll() {
static final ArgsMap<InstabugLocale> locales = new ArgsMap<InstabugLocale>() {{
put("localeArabic", InstabugLocale.ARABIC);
put("localeAzerbaijani", InstabugLocale.AZERBAIJANI);
put("localeBulgarian", InstabugLocale.BULGARIAN);
put("localeChineseSimplified", InstabugLocale.SIMPLIFIED_CHINESE);
put("localeChineseTraditional", InstabugLocale.TRADITIONAL_CHINESE);
put("localeCroatian", InstabugLocale.CROATIAN);
put("localeCzech", InstabugLocale.CZECH);
put("localeDanish", InstabugLocale.DANISH);
put("localeDutch", InstabugLocale.NETHERLANDS);
put("localeEnglish", InstabugLocale.ENGLISH);
put("localeEstonian", InstabugLocale.ESTONIAN);
put("localeFrench", InstabugLocale.FRENCH);
put("localeGerman", InstabugLocale.GERMAN);
put("localeGreek", InstabugLocale.GREEK);
put("localeIndonesian", InstabugLocale.INDONESIAN);
put("localeItalian", InstabugLocale.ITALIAN);
put("localeJapanese", InstabugLocale.JAPANESE);
put("localeKorean", InstabugLocale.KOREAN);
put("localeLatvian", InstabugLocale.LATVIAN);
put("localeLithuanian", InstabugLocale.LITHUANIAN);
put("localeNorwegian", InstabugLocale.NORWEGIAN);
put("localePolish", InstabugLocale.POLISH);
put("localePortugueseBrazil", InstabugLocale.PORTUGUESE_BRAZIL);
put("localePortuguesePortugal", InstabugLocale.PORTUGUESE_PORTUGAL);
put("localeRomanian", InstabugLocale.ROMANIAN);
put("localeRussian", InstabugLocale.RUSSIAN);
put("localeSpanish", InstabugLocale.SPANISH);
put("localeSerbian", InstabugLocale.SERBIAN);
put("localeSlovak", InstabugLocale.SLOVAK);
put("localeSlovenian", InstabugLocale.SLOVENIAN);
put("localeSpanish", InstabugLocale.SPANISH);
put("localeSwedish", InstabugLocale.SWEDISH);
put("localeTurkish", InstabugLocale.TURKISH);
put("localeUkrainian", InstabugLocale.UKRAINIAN);
}};

static final ArgsMap<Key> placeholders = new ArgsMap<Key>() {{
Expand Down
6 changes: 5 additions & 1 deletion examples/default/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

subprojects {
subprojects {
ext {
compileSdk = rootProject.ext.compileSdkVersion
minSdk = rootProject.ext.minSdkVersion
Expand Down Expand Up @@ -68,5 +68,9 @@ allprojects {
}
google()
maven { url 'https://www.jitpack.io' }

maven {
url 'https://oss.sonatype.org/content/repositories/snapshots'
}
}
}
2 changes: 2 additions & 0 deletions examples/default/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ platform :ios, '11.0'
target 'InstabugExample' do
config = use_native_modules!

pod 'Instabug', :podspec => 'https://ios-releases.instabug.com/custom/feature-add-more-languages/11.10.5/Instabug.podspec'

use_react_native!(
:path => config[:reactNativePath],
# to enable hermes on iOS, change `false` to `true` and then install pods
Expand Down
14 changes: 8 additions & 6 deletions examples/default/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ PODS:
- FlipperKit/FlipperKitNetworkPlugin
- fmt (6.2.1)
- glog (0.3.5)
- Instabug (11.10.1)
- Instabug (11.10.5)
- libevent (2.1.12)
- OCMock (3.9.1)
- OpenSSL-Universal (1.1.180)
Expand Down Expand Up @@ -342,7 +342,7 @@ PODS:
- React-logger (= 0.66.0)
- React-perflogger (= 0.66.0)
- RNInstabug (11.10.0):
- Instabug (= 11.10.1)
- Instabug
- React-Core
- RNScreens (3.20.0):
- React-Core
Expand Down Expand Up @@ -382,6 +382,7 @@ DEPENDENCIES:
- FlipperKit/FlipperKitUserDefaultsPlugin (= 0.99.0)
- FlipperKit/SKIOSNetworkPlugin (= 0.99.0)
- glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
- Instabug (from `https://ios-releases.instabug.com/custom/feature-add-more-languages/11.10.5/Instabug.podspec`)
- OCMock
- RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`)
- RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`)
Expand Down Expand Up @@ -429,7 +430,6 @@ SPEC REPOS:
- Flipper-RSocket
- FlipperKit
- fmt
- Instabug
- libevent
- OCMock
- OpenSSL-Universal
Expand All @@ -446,6 +446,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native/React/FBReactNativeSpec"
glog:
:podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec"
Instabug:
:podspec: https://ios-releases.instabug.com/custom/feature-add-more-languages/11.10.5/Instabug.podspec
RCT-Folly:
:podspec: "../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec"
RCTRequired:
Expand Down Expand Up @@ -524,7 +526,7 @@ SPEC CHECKSUMS:
FlipperKit: d8d346844eca5d9120c17d441a2f38596e8ed2b9
fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9
glog: 5337263514dd6f09803962437687240c5dc39aa4
Instabug: 8b0fcb6dd1bb91ae30a80176431d3e7f57ec3c4f
Instabug: fef0dcdf9ce55c668468c49f1caeba71d83beaf1
libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
OCMock: 9491e4bec59e0b267d52a9184ff5605995e74be8
OpenSSL-Universal: 1aa4f6a6ee7256b83db99ec1ccdaa80d10f9af9b
Expand Down Expand Up @@ -553,13 +555,13 @@ SPEC CHECKSUMS:
React-RCTVibration: 53b92d54b923283638cb0186da7a5c2d2b70a49b
React-runtimeexecutor: 4bb657a97aa74568d9ed634c8bd478299bb8a3a6
ReactCommon: eb059748e842a1a86025ebbd4ac9d99e74492f88
RNInstabug: 461ac240d658da2727c01f89ddb5428842c950ca
RNInstabug: e87ecb39e45510a4b2950120f79af8e8d1689b4a
RNScreens: 218801c16a2782546d30bd2026bb625c0302d70f
RNSVG: 551acb6562324b1d52a4e0758f7ca0ec234e278f
RNVectorIcons: fcc2f6cb32f5735b586e66d14103a74ce6ad61f8
Yoga: c11abbf5809216c91fcd62f5571078b83d9b6720
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a

PODFILE CHECKSUM: 476a97b315e53c07a2d8fa2ea0455471001f56f5
PODFILE CHECKSUM: 3fdfd26f20172910b20c4095ffb244799bee5ec0

COCOAPODS: 1.11.3
9 changes: 9 additions & 0 deletions ios/RNInstabug/ArgsRegistry.m
Original file line number Diff line number Diff line change
Expand Up @@ -158,24 +158,33 @@ + (ArgsDictionary *) locales {
return @{
@"localeArabic": @(IBGLocaleArabic),
@"localeAzerbaijani": @(IBGLocaleAzerbaijani),
@"localeBulgarian": @(IBGLocaleBulgarian),
@"localeChineseSimplified": @(IBGLocaleChineseSimplified),
@"localeChineseTraditional": @(IBGLocaleChineseTraditional),
@"localeCroatian": @(IBGLocaleCroatian),
@"localeCzech": @(IBGLocaleCzech),
@"localeDanish": @(IBGLocaleDanish),
@"localeDutch": @(IBGLocaleDutch),
@"localeEnglish": @(IBGLocaleEnglish),
@"localeEstonian": @(IBGLocaleEstonian),
@"localeFrench": @(IBGLocaleFrench),
@"localeGerman": @(IBGLocaleGerman),
@"localeGreek": @(IBGLocaleGreek),
@"localeItalian": @(IBGLocaleItalian),
@"localeJapanese": @(IBGLocaleJapanese),
@"localeKorean": @(IBGLocaleKorean),
@"localeLatvian": @(IBGLocaleLatvian),
@"localeLithuanian": @(IBGLocaleLithuanian),
@"localePolish": @(IBGLocalePolish),
@"localePortugueseBrazil": @(IBGLocalePortugueseBrazil),
@"localeRomanian": @(IBGLocaleRomanian),
@"localeRussian": @(IBGLocaleRussian),
@"localeSerbian": @(IBGLocaleSerbian),
@"localeSlovenian": @(IBGLocaleSlovenian),
a7medev marked this conversation as resolved.
Show resolved Hide resolved
@"localeSpanish": @(IBGLocaleSpanish),
@"localeSwedish": @(IBGLocaleSwedish),
@"localeTurkish": @(IBGLocaleTurkish),
@"localeUkrainian": @(IBGLocaleUkrainian),
};
}

Expand Down
9 changes: 9 additions & 0 deletions src/native/NativeConstants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,24 +106,33 @@ interface NativeReproStepsMode {
interface NativeLocale {
localeArabic: any;
localeAzerbaijani: any;
localeBulgarian: any;
localeChineseSimplified: any;
localeChineseTraditional: any;
localeCroatian: any;
localeCzech: any;
localeDanish: any;
localeDutch: any;
localeEnglish: any;
localeEstonian: any;
localeFrench: any;
localeGerman: any;
localeGreek: any;
localeItalian: any;
localeJapanese: any;
localeKorean: any;
localeLatvian: any;
localeLithuanian: any;
localePolish: any;
localePortugueseBrazil: any;
localeRomanian: any;
localeRussian: any;
localeSlovenian: any;
localeSpanish: any;
localeSerbian: any;
localeSwedish: any;
localeTurkish: any;
localeUkrainian: any;
}

interface NativeStringKey {
Expand Down
9 changes: 9 additions & 0 deletions src/utils/ArgsRegistry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,24 +173,33 @@ export enum reproStepsMode {
export enum locale {
arabic = constants.localeArabic,
azerbaijani = constants.localeAzerbaijani,
bulgarian = constants.localeBulgarian,
chineseSimplified = constants.localeChineseSimplified,
chineseTraditional = constants.localeChineseTraditional,
croatian = constants.localeCroatian,
czech = constants.localeCzech,
danish = constants.localeDanish,
dutch = constants.localeDutch,
english = constants.localeEnglish,
estonian = constants.localeEstonian,
french = constants.localeFrench,
german = constants.localeGerman,
greek = constants.localeGreek,
italian = constants.localeItalian,
japanese = constants.localeJapanese,
korean = constants.localeKorean,
latvian = constants.localeLatvian,
lithuanian = constants.localeLithuanian,
polish = constants.localePolish,
portugueseBrazil = constants.localePortugueseBrazil,
romanian = constants.localeRomanian,
russian = constants.localeRussian,
serbian = constants.localeSerbian,
slovenian = constants.localeSlovenian,
spanish = constants.localeSpanish,
swedish = constants.localeSwedish,
turkish = constants.localeTurkish,
ukrainian = constants.localeUkrainian,
}

/**
Expand Down
9 changes: 9 additions & 0 deletions src/utils/Enums.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,24 +121,33 @@ export enum ReproStepsMode {
export enum Locale {
arabic = constants.localeArabic,
azerbaijani = constants.localeAzerbaijani,
bulgarian = constants.localeBulgarian,
chineseSimplified = constants.localeChineseSimplified,
chineseTraditional = constants.localeChineseTraditional,
croatian = constants.localeCroatian,
czech = constants.localeCzech,
danish = constants.localeDanish,
dutch = constants.localeDutch,
english = constants.localeEnglish,
estonian = constants.localeEstonian,
french = constants.localeFrench,
german = constants.localeGerman,
greek = constants.localeGreek,
italian = constants.localeItalian,
japanese = constants.localeJapanese,
korean = constants.localeKorean,
latvian = constants.localeLatvian,
lithuanian = constants.localeLithuanian,
polish = constants.localePolish,
portugueseBrazil = constants.localePortugueseBrazil,
romanian = constants.localeRomanian,
russian = constants.localeRussian,
serbian = constants.localeSerbian,
slovenian = constants.localeSlovenian,
spanish = constants.localeSpanish,
swedish = constants.localeSwedish,
turkish = constants.localeTurkish,
ukrainian = constants.localeUkrainian,
}

/**
Expand Down