Skip to content

fix ImportGlossaryV3 validation#107

Merged
Fesenko-A merged 2 commits into
mainfrom
develop
Jul 10, 2026
Merged

fix ImportGlossaryV3 validation#107
Fesenko-A merged 2 commits into
mainfrom
develop

Conversation

@Fesenko-A

Copy link
Copy Markdown
Contributor

Bug fixes for the 'Import glossary (multilingual)' action

@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

Changes

Glossary language validation

Layer / File(s) Summary
Supported glossary pair contract
Apps.DeepL/Entities/GlossaryPairEntity.cs, Apps.DeepL/Extensions/TranslatorClientExtensions.cs, Apps.DeepL/Apps.DeepL.csproj
Adds normalized glossary pair modeling, supported-pair retrieval, and the DeepL.net package update.
Glossary import filtering
Apps.DeepL/Actions/GlossaryActions.cs
Skips targets matching the pivot or unsupported by DeepL’s normalized glossary language pairs.

File path construction

Layer / File(s) Summary
Platform-aware file paths
Tests.DeepL/Base/FileManager.cs
Uses Path.Combine for downloaded input and uploaded output paths.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant GlossaryImport as ImportGlossaryV3
  participant Extension as TranslatorClientExtensions
  participant DeepL as Translator
  GlossaryImport->>Extension: GetSupportedGlossaryPairs()
  Extension->>DeepL: GetGlossaryLanguagesAsync()
  DeepL-->>Extension: Supported language pairs
  Extension-->>GlossaryImport: HashSet<GlossaryPairEntity>
  GlossaryImport->>GlossaryImport: Normalize pivot and target languages
  GlossaryImport->>GlossaryImport: Skip identical or unsupported pairs
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: fixing ImportGlossaryV3 validation.
Description check ✅ Passed The description is directly related to the multilingual glossary import fixes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch develop

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
Tests.DeepL/Base/FileManager.cs (1)

10-10: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Cross-platform path construction looks good.

Using Path.Combine instead of hardcoded separators correctly addresses non-Windows compatibility. Minor nit: the nested Path.Combine calls can be flattened using the params overload for readability.

♻️ Optional simplification
-        var path = Path.Combine(folderLocation, Path.Combine("Input", reference.Name));
+        var path = Path.Combine(folderLocation, "Input", reference.Name);
-        var path = Path.Combine(folderLocation, Path.Combine("Output", fileName));
+        var path = Path.Combine(folderLocation, "Output", fileName);

Also applies to: 19-19

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Tests.DeepL/Base/FileManager.cs` at line 10, Flatten the nested Path.Combine
calls in the relevant FileManager path assignments, including the occurrences
around the referenced lines, by passing folderLocation, "Input", and
reference.Name directly to the params overload.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@Apps.DeepL/Extensions/TranslatorClientExtensions.cs`:
- Around line 8-12: Update GetSupportedGlossaryPairs to map each
GlossaryLanguagePair using its SourceLanguage and TargetLanguage properties
instead of SourceLanguageCode and TargetLanguageCode, while preserving the
existing HashSet conversion.

---

Nitpick comments:
In `@Tests.DeepL/Base/FileManager.cs`:
- Line 10: Flatten the nested Path.Combine calls in the relevant FileManager
path assignments, including the occurrences around the referenced lines, by
passing folderLocation, "Input", and reference.Name directly to the params
overload.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 4e40cd03-91a8-4c2e-b071-f79c197116b4

📥 Commits

Reviewing files that changed from the base of the PR and between 45ba3be and 568dbad.

📒 Files selected for processing (5)
  • Apps.DeepL/Actions/GlossaryActions.cs
  • Apps.DeepL/Apps.DeepL.csproj
  • Apps.DeepL/Entities/GlossaryPairEntity.cs
  • Apps.DeepL/Extensions/TranslatorClientExtensions.cs
  • Tests.DeepL/Base/FileManager.cs

Comment thread Apps.DeepL/Extensions/TranslatorClientExtensions.cs
@Fesenko-A Fesenko-A merged commit 203b020 into main Jul 10, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant