Skip to content

feat: strings context management#987

Open
yevheniyJ wants to merge 5 commits intomainfrom
strings-context-management
Open

feat: strings context management#987
yevheniyJ wants to merge 5 commits intomainfrom
strings-context-management

Conversation

@yevheniyJ
Copy link
Collaborator

@yevheniyJ yevheniyJ commented Feb 16, 2026

  • crowdin context download
  • crowdin context upload
  • crowdin context reset
  • crowdin context status

@codecov
Copy link

codecov bot commented Feb 16, 2026

Codecov Report

❌ Patch coverage is 62.26415% with 160 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.88%. Comparing base (9243204) to head (b2b91ac).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...in/cli/commands/actions/ContextDownloadAction.java 67.08% 18 Missing and 9 partials ⚠️
...wdin/cli/commands/actions/ContextStatusAction.java 68.97% 19 Missing and 8 partials ⚠️
...owdin/cli/commands/actions/ContextResetAction.java 62.13% 17 Missing and 8 partials ⚠️
...main/java/com/crowdin/cli/utils/AiContextUtil.java 40.00% 21 Missing and 3 partials ⚠️
...n/cli/commands/picocli/ContextResetSubcommand.java 38.89% 4 Missing and 7 partials ⚠️
...a/com/crowdin/cli/client/CrowdinProjectClient.java 9.10% 10 Missing ⚠️
...rc/main/java/com/crowdin/cli/utils/StringUtil.java 25.00% 8 Missing and 1 partial ⚠️
.../cli/commands/picocli/ContextStatusSubcommand.java 45.46% 4 Missing and 2 partials ⚠️
src/main/java/com/crowdin/cli/utils/GlobUtil.java 80.00% 5 Missing and 1 partial ⚠️
.../cli/commands/picocli/ContextUploadSubcommand.java 28.58% 5 Missing ⚠️
... and 4 more
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #987      +/-   ##
============================================
+ Coverage     65.26%   65.88%   +0.63%     
- Complexity     1679     1788     +109     
============================================
  Files           244      256      +12     
  Lines          6887     7481     +594     
  Branches       1047     1166     +119     
============================================
+ Hits           4494     4928     +434     
- Misses         1795     1913     +118     
- Partials        598      640      +42     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@yevheniyJ yevheniyJ marked this pull request as ready for review February 18, 2026 19:14

import java.util.regex.Pattern;

public class GlobUtil {
Copy link
Member

Choose a reason for hiding this comment

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

Could we reuse the file pattern approach that we already have for sources and translations?

# CROWDIN CONTEXT DOWNLOAD
crowdin.context.download.usage.description=Download strings context
crowdin.context.download.usage.customSynopsis=@|fg(green) crowdin context download|@ <to> [CONFIG OPTIONS] [OPTIONS]
crowdin.context.download.to=File path to download the context to
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
crowdin.context.download.to=File path to download the context to
crowdin.context.download.to=File name to download the context to (without extension)

crowdin.context.usage.customSynopsis=@|fg(green) crowdin context|@ [SUBCOMMAND] [CONFIG OPTIONS] [OPTIONS]

# CROWDIN CONTEXT DOWNLOAD
crowdin.context.download.usage.description=Download strings context
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
crowdin.context.download.usage.description=Download strings context
crowdin.context.download.usage.description=Download strings context to a separate file for enrichment by AI Agent

crowdin.context.download.usage.customSynopsis=@|fg(green) crowdin context download|@ <to> [CONFIG OPTIONS] [OPTIONS]
crowdin.context.download.to=File path to download the context to
crowdin.context.download.file=Filter strings by Crowdin file path (glob). May be specified multiple times
crowdin.context.download.label=Filter strings by label. May be specified multiple times
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
crowdin.context.download.label=Filter strings by label. May be specified multiple times
crowdin.context.download.label=Filter strings by labels (multiple labels can be specified)

for consistency with other commands

crowdin.context.download.branch=Filter by branch name
crowdin.context.download.croql=CroQL expression
crowdin.context.download.since=Only strings created after this date (YYYY-MM-DD)
crowdin.context.download.format=Output format (only option: jsonl)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
crowdin.context.download.format=Output format (only option: jsonl)
crowdin.context.download.format=Output format. Supported values: jsonl

# CROWDIN CONTEXT UPLOAD
crowdin.context.upload.usage.description=Upload strings context
crowdin.context.upload.usage.customSynopsis=@|fg(green) crowdin context upload|@ <file> [CONFIG OPTIONS] [OPTIONS]
crowdin.context.upload.file=File path to upload context from
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
crowdin.context.upload.file=File path to upload context from
crowdin.context.upload.file=The file path to upload the context from. Only files previously downloaded by the context download command are supported

crowdin.context.status.usage.description=Show context coverage statistics
crowdin.context.status.usage.customSynopsis=@|fg(green) crowdin context status|@ [CONFIG OPTIONS] [OPTIONS]
crowdin.context.status.file=Filter strings by Crowdin file path (glob). May be specified multiple times
crowdin.context.status.label=Filter strings by label. May be specified multiple times
Copy link
Member

Choose a reason for hiding this comment

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

the same as for crowdin.context.download.label

crowdin.context.download.croql=CroQL expression
crowdin.context.download.since=Only strings created after this date (YYYY-MM-DD)
crowdin.context.download.format=Output format (only option: jsonl)
crowdin.context.download.status=Filter by context status (empty, ai, manual)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
crowdin.context.download.status=Filter by context status (empty, ai, manual)
crowdin.context.download.status=Filter by context status. Supported values: empty, ai, manual

# CROWDIN CONTEXT RESET
crowdin.context.reset.usage.description=Remove AI-generated context from strings, preserving manual context
crowdin.context.reset.usage.customSynopsis=@|fg(green) crowdin context reset|@ [CONFIG OPTIONS] [OPTIONS]
crowdin.context.reset.file=Only reset strings from matching files. May be specified multiple times
Copy link
Member

Choose a reason for hiding this comment

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

It looks like we frequently use "Can be specified multiple times" wording in the existing strings. Let's try to make it consistent

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.

2 participants

Comments