File tree Expand file tree Collapse file tree 1 file changed +19
-5
lines changed Expand file tree Collapse file tree 1 file changed +19
-5
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,19 @@ for (const lang of languages.filter(l => l !== "pxt")) {
8484
8585 const entries = { }
8686
87+ /*
88+ ERROR: already have entry for light
89+ ERROR: already have entry for line
90+ ERROR: already have entry for temperature
91+ ERROR: already have entry for NA
92+ ERROR: already have entry for red
93+ ERROR: already have entry for purple
94+ ERROR: already have entry for turn-left
95+ ERROR: already have entry for turn-right
96+ ERROR: already have entry for on
97+ ERROR: already have entry for off
98+ */
99+
87100 const tooltip2tid = `
88101 export function tooltip2tid(id: string): number {
89102 let tid: number = undefined
@@ -95,12 +108,13 @@ for (const lang of languages.filter(l => l !== "pxt")) {
95108 . filter ( k => / T \d + / . test ( k ) )
96109 . map ( k => {
97110 const tid = parseInt ( k . slice ( 1 ) )
98- if ( entries [ translations [ k ] ] ) {
99- console . log (
100- `ERROR: already have entry for ${ translations [ k ] } `
101- )
111+ const trans = translations [ k ] . replace ( / / g, "-" )
112+ if ( entries [ trans ] ) {
113+ console . log ( `ERROR: already have entry for ${ trans } ` )
114+ } else {
115+ entries [ trans ] = tid
102116 }
103- return ` else if (id === "${ translations [ k ] } ") tid = ${ tid } ;`
117+ return ` else if (id === "${ trans } ") tid = ${ tid } ;`
104118 } )
105119 . join ( "\n" ) }
106120 return tid
You can’t perform that action at this time.
0 commit comments