File tree Expand file tree Collapse file tree 8 files changed +96
-8
lines changed Expand file tree Collapse file tree 8 files changed +96
-8
lines changed Original file line number Diff line number Diff line change @@ -129,6 +129,7 @@ workflows:
129
129
only :
130
130
- dev
131
131
- v2
132
+ ignore :
132
133
- v2-dev
133
134
- build_next :
134
135
requires :
@@ -138,6 +139,7 @@ workflows:
138
139
only :
139
140
- dev
140
141
- v2
142
+ ignore :
141
143
- v2-dev
142
144
- publish_next :
143
145
requires :
@@ -147,6 +149,7 @@ workflows:
147
149
only :
148
150
- dev
149
151
- v2
152
+ ignore :
150
153
- v2-dev
151
154
release :
152
155
jobs :
Original file line number Diff line number Diff line change 1
1
{
2
2
"versions" : [
3
+ {
4
+ "version" : " 2.10.0" ,
5
+ "changes" : {
6
+ "new" : [],
7
+ "enhancements" : [],
8
+ "fixes" : [
9
+ " `TaxonomyPicker`: suggestions language is always English [#879](https://github.com/pnp/sp-dev-fx-controls-react/issues/879)"
10
+ ]
11
+ },
12
+ "contributions" : [
13
+ " [Peter Paul Kirschner](https://github.com/petkir)"
14
+ ]
15
+ },
3
16
{
4
17
"version" : " 2.9.0" ,
5
18
"changes" : {
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @pnp/spfx-controls-react" ,
3
3
"description" : " Reusable React controls for SharePoint Framework solutions" ,
4
- "version" : " 2.9 .0" ,
4
+ "version" : " 2.10 .0" ,
5
5
"engines" : {
6
6
"node" : " >=10"
7
7
},
Original file line number Diff line number Diff line change
1
+ export class LocalesHelper {
2
+
3
+ private static locales = {
4
+ 1025 : 'ar-SA' ,
5
+ 1026 : 'bg-BG' ,
6
+ 1027 : 'ca-ES' ,
7
+ 1028 : 'zh-TW' ,
8
+ 1029 : 'cs-CZ' ,
9
+ 1030 : 'da-DK' ,
10
+ 1031 : 'de-DE' ,
11
+ 1032 : 'el-GR' ,
12
+ 1033 : 'en-US' ,
13
+ 1035 : 'fi-FI' ,
14
+ 1036 : 'fr-FR' ,
15
+ 1037 : 'he-IL' ,
16
+ 1038 : 'hu-HU' ,
17
+ 1040 : 'it-IT' ,
18
+ 1041 : 'ja-JP' ,
19
+ 1042 : 'ko-KR' ,
20
+ 1043 : 'nl-NL' ,
21
+ 1044 : 'nb-NO' ,
22
+ 1045 : 'pl-PL' ,
23
+ 1046 : 'pt-BR' ,
24
+ 1048 : 'ro-RO' ,
25
+ 1049 : 'ru-RU' ,
26
+ 1050 : 'hr-HR' ,
27
+ 1051 : 'sk-SK' ,
28
+ 1053 : 'sv-SE' ,
29
+ 1054 : 'th-TH' ,
30
+ 1055 : 'tr-TR' ,
31
+ 1057 : 'id-ID' ,
32
+ 1058 : 'uk-UA' ,
33
+ 1060 : 'sl-SI' ,
34
+ 1061 : 'et-EE' ,
35
+ 1062 : 'lv-LV' ,
36
+ 1063 : 'lt-LT' ,
37
+ 1066 : 'vi-VN' ,
38
+ 1068 : 'az-Latn-AZ' ,
39
+ 1069 : 'eu-ES' ,
40
+ 1071 : 'mk-MK' ,
41
+ 1081 : 'hi-IN' ,
42
+ 1086 : 'ms-MY' ,
43
+ 1087 : 'kk-KZ' ,
44
+ 1106 : 'cy-GB' ,
45
+ 1110 : 'gl-ES' ,
46
+ 1164 : 'prs-AF' ,
47
+ 2052 : 'zh-CN' ,
48
+ 2070 : 'pt-PT' ,
49
+ 2108 : 'ga-IE' ,
50
+ 3082 : 'es-ES' ,
51
+ 5146 : 'bs-Latn-BA' ,
52
+ 9242 : 'sr-Latn-RS' ,
53
+ 10266 : 'sr-Cyrl-RS' ,
54
+ } ;
55
+ public static getLocaleId ( localeName : string ) : number {
56
+ const pos : number = Object . keys ( this . locales ) . findIndex ( locKey => this . locales [ locKey ] === localeName ) ;
57
+ if ( pos > - 1 ) {
58
+ return parseInt ( Object . keys ( this . locales ) [ pos ] ) ;
59
+ }
60
+ else {
61
+ return 0 ;
62
+ }
63
+ }
64
+
65
+ public static getLocaleName ( localeId : number ) : string {
66
+ return this . locales [ localeId ] || '' ;
67
+ }
68
+
69
+
70
+ }
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import '@pnp/sp/fields';
9
9
import { SPHttpClient } from '@microsoft/sp-http' ;
10
10
import { IFieldInfo } from '@pnp/sp/fields' ;
11
11
import '@pnp/sp/site-users/web' ;
12
+ import '@pnp/sp/webs' ;
12
13
13
14
declare var window : any ;
14
15
Original file line number Diff line number Diff line change 1
1
export * from './FieldRendererHelper' ;
2
2
export * from './GeneralHelper' ;
3
- export * from './SPHelper' ;
3
+ export * from './SPHelper' ;
4
+ export * from './LocalesHelper' ;
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ import SPTermStoreMockHttpClient from './SPTermStorePickerMockService';
15
15
import { findIndex } from '@microsoft/sp-lodash-subset' ;
16
16
import { ExtensionContext } from '@microsoft/sp-extension-base' ;
17
17
import { EmptyGuid } from '../common/Constants' ;
18
-
18
+ import { LocalesHelper } from '../common/utilities/LocalesHelper' ;
19
19
20
20
/**
21
21
* Service implementation to manage term stores in SharePoint
@@ -297,7 +297,7 @@ export default class SPTermStorePickerService {
297
297
return null ;
298
298
}
299
299
}
300
- else {
300
+ else {
301
301
return null ;
302
302
}
303
303
} catch ( error ) {
@@ -327,7 +327,7 @@ export default class SPTermStorePickerService {
327
327
const {
328
328
termsetNameOrID,
329
329
hideDeprecatedTags,
330
- hideTagsNotAvailableForTagging,
330
+ hideTagsNotAvailableForTagging,
331
331
} = this . props ;
332
332
333
333
const terms = await this . getAllTermsByAnchorId (
@@ -424,10 +424,10 @@ export default class SPTermStorePickerService {
424
424
resolve ( null ) ;
425
425
return ;
426
426
}
427
-
427
+ let loc = LocalesHelper . getLocaleId ( this . context . pageContext . cultureInfo . currentUICultureName ) ;
428
428
let data = {
429
429
start : searchText ,
430
- lcid : this . context . pageContext . web . language , // TODO : get the user's navitation LCID. Here it's the default web language LCID
430
+ lcid : loc !== 0 ? loc : this . context . pageContext . web . language ,
431
431
sspList : this . cleanGuid ( termStore [ 0 ] . Id ) ,
432
432
termSetList : TermSetId ,
433
433
anchorId : this . props . anchorId ? this . props . anchorId : EmptyGuid ,
You can’t perform that action at this time.
0 commit comments