@@ -44,15 +44,15 @@ export function correctTranslatedContentStrings(
4444 )
4545 content = content . replaceAll ( '{{ glosario.term }}' , '{{ glossary.term }}' )
4646 content = content . replaceAll ( '{{ glosario.description }}' , '{{ glossary.description }}' )
47- // Catch "o" and "y/o" between any plan names in ifversion/elsif tags
47+ // Catch "o" and "y/o" between any plan names in ifversion/elsif/if tags
4848 content = content . replace (
49- / \{ % - ? (?: i f v e r s i o n | e l s i f ) [ ^ % ] * ?(?: \b y \/ o \b | \b o \b ) [ ^ % ] * ?% \} / g,
49+ / \{ % - ? (?: i f v e r s i o n | e l s i f | i f ) [ ^ % ] * ?(?: \b y \/ o \b | \b o \b ) [ ^ % ] * ?% \} / g,
5050 ( match ) => {
5151 return match . replace ( / y \/ o / g, ' or ' ) . replace ( / o / g, ' or ' )
5252 } ,
5353 )
54- // Spanish "no" for "not" in ifversion tags
55- content = content . replace ( / \{ % - ? (?: i f v e r s i o n | e l s i f ) [ ^ % ] * ?\b n o \b [ ^ % ] * ?% \} / g, ( match ) => {
54+ // Spanish "no" for "not" in ifversion/elsif/if tags
55+ content = content . replace ( / \{ % - ? (?: i f v e r s i o n | e l s i f | i f ) [ ^ % ] * ?\b n o \b [ ^ % ] * ?% \} / g, ( match ) => {
5656 return match . replace ( / n o / g, ' not ' )
5757 } )
5858 // Translated for-loop keywords
@@ -205,8 +205,8 @@ export function correctTranslatedContentStrings(
205205 content = content . replaceAll ( '{% %de dados reusables.' , '{% data reusables.' )
206206 content = content . replaceAll ( '{% %de dados variables.' , '{% data variables.' )
207207 content = content . replaceAll ( '{% %móvel }' , '{% mobile %}' )
208- // Catch "ou" between any plan names in ifversion/elsif tags
209- content = content . replace ( / \{ % - ? (?: i f v e r s i o n | e l s i f ) [ ^ % ] * ?o u [ ^ % ] * ?% \} / g, ( match ) => {
208+ // Catch "ou" between any plan names in ifversion/elsif/if tags
209+ content = content . replace ( / \{ % - ? (?: i f v e r s i o n | e l s i f | i f ) [ ^ % ] * ?o u [ ^ % ] * ?% \} / g, ( match ) => {
210210 return match . replace ( / o u / g, ' or ' )
211211 } )
212212 }
@@ -225,8 +225,8 @@ export function correctTranslatedContentStrings(
225225 // Stray Chinese `,则为` ("then") merged with `{%` before HTML: `,则为 {%<tag>` → `<tag>`
226226 // The regex consumes the `<` to avoid producing a double `<<`.
227227 content = content . replace ( / , 则 为 \{ % < / g, '<' )
228- // Catch "或" between any plan names in ifversion/elsif tags
229- content = content . replace ( / \{ % - ? (?: i f v e r s i o n | e l s i f ) [ ^ % ] * ?或 [ ^ % ] * ?% \} / g, ( match ) => {
228+ // Catch "或" between any plan names in ifversion/elsif/if tags
229+ content = content . replace ( / \{ % - ? (?: i f v e r s i o n | e l s i f | i f ) [ ^ % ] * ?或 [ ^ % ] * ?% \} / g, ( match ) => {
230230 return match . replace ( / 或 / g, ' or ' )
231231 } )
232232 }
@@ -267,8 +267,8 @@ export function correctTranslatedContentStrings(
267267 content = content . replaceAll ( '{% ifversion ghec или fpt %}' , '{% ifversion ghec or fpt %}' )
268268 content = content . replaceAll ( '{% ghes или ghec %}' , '{% ifversion ghes or ghec %}' )
269269 content = content . replaceAll ( '{% elsif ghec или ghes %}' , '{% elsif ghec or ghes %}' )
270- // Catch remaining "или" between any plan names in ifversion/elsif tags
271- content = content . replace ( / \{ % - ? (?: i f v e r s i o n | e l s i f ) [ ^ % ] * ?и л и [ ^ % ] * ?% \} / g, ( match ) => {
270+ // Catch remaining "или" between any plan names in ifversion/elsif/if tags
271+ content = content . replace ( / \{ % - ? (?: i f v e r s i o n | e l s i f | i f ) [ ^ % ] * ?и л и [ ^ % ] * ?% \} / g, ( match ) => {
272272 return match . replace ( / и л и / g, ' or ' )
273273 } )
274274 content = content . replaceAll ( '{% endif _%}' , '{% endif %}' )
@@ -364,10 +364,14 @@ export function correctTranslatedContentStrings(
364364 content = content . replaceAll ( '{% %brut }' , '{% raw %}' )
365365 content = content . replaceAll ( '{% redessiner %}' , '{% endraw %}' )
366366 content = content . replaceAll ( '{% données ' , '{% data ' )
367- // Catch remaining "ou" between any plan names in ifversion/elsif tags
368- content = content . replace ( / \{ % - ? (?: i f v e r s i o n | e l s i f ) [ ^ % ] * ?o u [ ^ % ] * ?% \} / g, ( match ) => {
367+ // Catch remaining "ou" between any plan names in ifversion/elsif/if tags
368+ content = content . replace ( / \{ % - ? (?: i f v e r s i o n | e l s i f | i f ) [ ^ % ] * ?o u [ ^ % ] * ?% \} / g, ( match ) => {
369369 return match . replace ( / o u / g, ' or ' )
370370 } )
371+ // French guillemets «/» → " inside if/ifversion/elsif tags
372+ content = content . replace ( / \{ % - ? \s * (?: i f | i f v e r s i o n | e l s i f ) \s [ ^ % ] * ?[ « » ] [ ^ % ] * ?% \} / g, ( match ) => {
373+ return match . replace ( / « \s * / g, '"' ) . replace ( / \s * » / g, '"' )
374+ } )
371375 // French decimal comma in version numbers: `3,16` → `3.16`
372376 content = content . replace ( / \{ % - ? (?: i f v e r s i o n | e l s i f ) [ ^ % ] * ?% \} / g, ( match ) => {
373377 return match . replace ( / ( \d ) , ( \d ) / g, '$1.$2' )
@@ -408,8 +412,8 @@ export function correctTranslatedContentStrings(
408412 content = content . replaceAll ( '{% 기타 %}' , '{% else %}' )
409413 content = content . replaceAll ( '{% 참고 %}' , '{% note %}' )
410414 content = content . replaceAll ( '{% 원시 %}' , '{% raw %}' )
411- // Catch "또는" between any plan names in ifversion/elsif tags
412- content = content . replace ( / \{ % - ? (?: i f v e r s i o n | e l s i f ) [ ^ % ] * ?또 는 [ ^ % ] * ?% \} / g, ( match ) => {
415+ // Catch "또는" between any plan names in ifversion/elsif/if tags
416+ content = content . replace ( / \{ % - ? (?: i f v e r s i o n | e l s i f | i f ) [ ^ % ] * ?또 는 [ ^ % ] * ?% \} / g, ( match ) => {
413417 return match . replace ( / 또 는 / g, ' or ' )
414418 } )
415419
@@ -431,8 +435,8 @@ export function correctTranslatedContentStrings(
431435 content = content . replaceAll ( '{%-Daten-variables' , '{%- data variables' )
432436 content = content . replaceAll ( '{%- ifversion fpt oder ghec %}' , '{%- ifversion fpt or ghec %}' )
433437 content = content . replaceAll ( '{% ifversion fpt oder ghec %}' , '{% ifversion fpt or ghec %}' )
434- // Catch remaining "oder" between any plan names in ifversion/elsif tags
435- content = content . replace ( / \{ % - ? (?: i f v e r s i o n | e l s i f ) [ ^ % ] * ?o d e r [ ^ % ] * ?% \} / g, ( match ) => {
438+ // Catch remaining "oder" between any plan names in ifversion/elsif/if tags
439+ content = content . replace ( / \{ % - ? (?: i f v e r s i o n | e l s i f | i f ) [ ^ % ] * ?o d e r [ ^ % ] * ?% \} / g, ( match ) => {
436440 return match . replace ( / o d e r / g, ' or ' )
437441 } )
438442 // Translated block tags
0 commit comments