Commit ef9f6ee
Nikolaos Protopapas
Add multi-base resource group support (closes #6)
Treat the base name of a .resx/.json/etc file (e.g. CustomerResources vs
SharedResources) as a first-class disambiguator instead of conflating it
with "language." Multi-base directories no longer show duplicate columns,
silently drop keys, or report nonsensical coverage.
Backend:
- New ResourceGroup / ResourceDirectory models + DiscoverResourceGroups
default-interface method on IResourceDiscovery
- LanguageController, ResourcesController, StatsController, ValidationController,
ExportController, ImportController, TranslationController,
MergeDuplicatesController, SearchController all aggregate or scope by
resource group; AddLanguage/RemoveLanguage operate across every group
- Key edit endpoints take a ResourceGroup parameter; defaults to the only
group when single-group, required when multi-group
Local cloud sync:
- LocalEntry / MergedEntry / EntryChange / EntryDeletion / EntryConflict
carry BaseName; KeyLevelMerger keys by (BaseName, Key, Lang)
- FileRegenerator groups by (BaseName, Lang) and routes new-file writes
through GetNewLanguageFilePath(baseName, lang)
- SyncState v3 schema (EntriesV3 outer-keyed by BaseName) with automatic
v2 -> v3 migration on load; legacy 2-arg overloads preserved
- PushCommand / PullCommand / CloneCommand switch to DiscoverResourceGroups
and consume the new NewEntryHashesByGroup response shape
Cloud API:
- resource_keys, github_sync_state, pending_conflicts each get a base_name
column with EF migrations; unique indexes extended to include it
- KeySyncService, ResourceService, SyncHistoryService, GitHubSyncService,
GitHubPullService, FileImportService all thread BaseName
- File-path -> BaseName extraction for resx/json/xliff/po so GitHub pull
maps repo files to their resource groups
- New POST /api/projects/{id}/sync/migrate-groups endpoint for re-keying
legacy BaseName="" rows when a single-group project grows a second group
- New "lrm cloud migrate-groups --from --to" CLI command
Cloud Web UI:
- TranslationGrid grows a conditional Group column and toolbar filter when
the loaded data spans multiple base names
- AddKeyDialog grows a Resource Group picker (visible only when caller
passes a multi-group list); Editor.razor builds the list from loaded rows
- Web ResourceService and Api ResourcesController endpoints accept an
optional baseName query parameter on get/update/delete
VS Code extension:
- resourceGroup field on ResourceKey / ResourceKeyDetails DTOs
- Editor renders a Resource Group column when multi-group; edits forward
resourceGroup so updates land in the right file
- Dashboard math now correct because /api/stats is now group-aware
Tests:
- 6 new local discovery + controller integration tests
- 5 new cloud server tests (KeySyncService, multi-group push, legacy
empty-BaseName fallback, migrate-groups happy path + rollback)
- Existing tests updated for v3 SyncState format and new error messages
- Integration test fixture at cloud/full-integration-test/tests/05-multi-group.sh1 parent cf7d46a commit ef9f6ee
82 files changed
Lines changed: 12531 additions & 711 deletions
File tree
- Commands/Cloud
- Controllers
- LocalizationManager.Core
- Abstractions
- Cloud
- Models
- Models
- LocalizationManager.Tests
- IntegrationTests
- TestData
- MultiGroupJson
- MultiGroupResx
- UnitTests
- Backends
- Cloud
- Models/Api
- cloud
- full-integration-test
- test-projects/multigroup-resx
- tests
- src
- LrmCloud.Api
- Controllers
- Data
- Migrations
- Services
- LrmCloud.Web
- Components
- Models
- Pages/Projects
- Services
- tests/LrmCloud.Tests/Services
- docs/superpowers/plans
- vscode-extension/src
- backend
- views
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
496 | 496 | | |
497 | 497 | | |
498 | 498 | | |
499 | | - | |
| 499 | + | |
| 500 | + | |
500 | 501 | | |
501 | | - | |
502 | | - | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
503 | 506 | | |
504 | | - | |
505 | | - | |
506 | | - | |
507 | | - | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
508 | 512 | | |
509 | 513 | | |
510 | 514 | | |
| |||
554 | 558 | | |
555 | 559 | | |
556 | 560 | | |
557 | | - | |
558 | | - | |
559 | | - | |
560 | | - | |
561 | | - | |
562 | | - | |
| 561 | + | |
| 562 | + | |
563 | 563 | | |
564 | 564 | | |
565 | 565 | | |
566 | | - | |
567 | | - | |
568 | | - | |
569 | | - | |
570 | | - | |
| 566 | + | |
571 | 567 | | |
572 | 568 | | |
573 | 569 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
210 | | - | |
| 210 | + | |
| 211 | + | |
211 | 212 | | |
212 | 213 | | |
213 | 214 | | |
| |||
272 | 273 | | |
273 | 274 | | |
274 | 275 | | |
| 276 | + | |
275 | 277 | | |
276 | 278 | | |
277 | 279 | | |
278 | 280 | | |
279 | 281 | | |
280 | | - | |
| 282 | + | |
281 | 283 | | |
282 | 284 | | |
283 | 285 | | |
| |||
288 | 290 | | |
289 | 291 | | |
290 | 292 | | |
| 293 | + | |
291 | 294 | | |
292 | 295 | | |
293 | 296 | | |
294 | 297 | | |
295 | 298 | | |
296 | | - | |
| 299 | + | |
297 | 300 | | |
298 | 301 | | |
299 | 302 | | |
| |||
575 | 578 | | |
576 | 579 | | |
577 | 580 | | |
578 | | - | |
| 581 | + | |
579 | 582 | | |
580 | 583 | | |
581 | 584 | | |
| |||
600 | 603 | | |
601 | 604 | | |
602 | 605 | | |
603 | | - | |
604 | | - | |
605 | | - | |
606 | | - | |
607 | | - | |
608 | | - | |
| 606 | + | |
| 607 | + | |
609 | 608 | | |
610 | | - | |
611 | | - | |
| 609 | + | |
| 610 | + | |
612 | 611 | | |
613 | | - | |
614 | | - | |
615 | | - | |
616 | | - | |
617 | | - | |
| 612 | + | |
618 | 613 | | |
619 | 614 | | |
620 | | - | |
| 615 | + | |
621 | 616 | | |
622 | 617 | | |
623 | | - | |
624 | | - | |
625 | | - | |
626 | | - | |
627 | | - | |
| 618 | + | |
628 | 619 | | |
629 | 620 | | |
630 | | - | |
| 621 | + | |
631 | 622 | | |
632 | 623 | | |
633 | | - | |
634 | | - | |
635 | | - | |
636 | | - | |
637 | | - | |
| 624 | + | |
638 | 625 | | |
639 | | - | |
| 626 | + | |
640 | 627 | | |
641 | 628 | | |
642 | 629 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
212 | | - | |
| 212 | + | |
| 213 | + | |
213 | 214 | | |
214 | 215 | | |
215 | 216 | | |
| |||
451 | 452 | | |
452 | 453 | | |
453 | 454 | | |
454 | | - | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
455 | 460 | | |
456 | | - | |
457 | | - | |
458 | | - | |
459 | | - | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
460 | 466 | | |
461 | | - | |
462 | | - | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
463 | 471 | | |
464 | | - | |
| 472 | + | |
465 | 473 | | |
466 | | - | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
467 | 481 | | |
468 | | - | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
469 | 486 | | |
470 | | - | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
471 | 491 | | |
472 | 492 | | |
473 | 493 | | |
474 | | - | |
475 | | - | |
| 494 | + | |
| 495 | + | |
476 | 496 | | |
477 | 497 | | |
478 | | - | |
479 | | - | |
480 | | - | |
481 | | - | |
482 | | - | |
| 498 | + | |
483 | 499 | | |
484 | | - | |
| 500 | + | |
485 | 501 | | |
486 | 502 | | |
487 | 503 | | |
| |||
0 commit comments