File tree Expand file tree Collapse file tree 3 files changed +35
-8
lines changed
Expand file tree Collapse file tree 3 files changed +35
-8
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " lingo.dev " : patch
3+ ---
4+
5+ i18n xcode-scstring-v2 log fix
Original file line number Diff line number Diff line change 11{
2+ "version" : " 1.10" ,
23 "locale" : {
34 "source" : " en" ,
4- "targets" : [" es" , " ja" , " ru" ]
5+ "targets" : [
6+ " es"
7+ ]
58 },
6- "buckets" : [
7- {
8- "type" : " xcode-xcstrings-v2" ,
9- "pathPattern" : " example.xcstrings"
9+ "buckets" : {
10+ "xcode-xcstrings-v2" : {
11+ "include" : [
12+ " ./example.xcstrings"
13+ ]
1014 }
11- ]
12- }
15+ },
16+ "$schema" : " https://lingo.dev/schema/i18n.json"
17+ }
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ import createProcessor from "../processor";
3636import { withExponentialBackoff } from "../utils/exp-backoff" ;
3737import trackEvent from "../utils/observability" ;
3838import { createDeltaProcessor } from "../utils/delta" ;
39+ import { isICUPluralObject } from "../loaders/xcode-xcstrings-icu" ;
3940
4041export default new Command ( )
4142 . command ( "i18n" )
@@ -485,7 +486,23 @@ export default new Command()
485486 }
486487
487488 const finalDiffSize = _ . chain ( finalTargetData )
488- . omitBy ( ( value , key ) => value === targetData [ key ] )
489+ . omitBy ( ( value , key ) => {
490+ const targetValue = targetData [ key ] ;
491+
492+ // For ICU plural objects, use deep equality (excluding Symbol)
493+ if (
494+ isICUPluralObject ( value ) &&
495+ isICUPluralObject ( targetValue )
496+ ) {
497+ return _ . isEqual (
498+ { icu : value . icu , _meta : value . _meta } ,
499+ { icu : targetValue . icu , _meta : targetValue . _meta } ,
500+ ) ;
501+ }
502+
503+ // Default strict equality for other values
504+ return value === targetValue ;
505+ } )
489506 . size ( )
490507 . value ( ) ;
491508
You can’t perform that action at this time.
0 commit comments