Skip to content

feat: add export formats Apple SDK and Android SDK#184

Merged
Anty0 merged 2 commits into
mainfrom
jirikuchynka/export-format-android-apple-sdk
Jun 15, 2026
Merged

feat: add export formats Apple SDK and Android SDK#184
Anty0 merged 2 commits into
mainfrom
jirikuchynka/export-format-android-apple-sdk

Conversation

@Anty0

@Anty0 Anty0 commented Jul 30, 2025

Copy link
Copy Markdown
Member

Requires tolgee/tolgee-platform#3186

Summary by CodeRabbit

  • New Features
    • Added export support for APPLE_SDK and ANDROID_SDK localization formats.
    • These formats are now selectable via the command-line --format option.
    • Exports generate the appropriate string format for each platform.
  • Bug Fixes
    • Attempting to import APPLE_SDK or ANDROID_SDK now fails with a clear “unsupported format” error, since imports remain unsupported.

@coderabbitai

coderabbitai Bot commented Jul 30, 2025

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6a52296e-0a4e-4c11-81d0-091fbe587348

📥 Commits

Reviewing files that changed from the base of the PR and between 53f16e7 and bcbf8c2.

📒 Files selected for processing (5)
  • schema.json
  • src/options.ts
  • src/schema.d.ts
  • src/utils/mapExportFormat.ts
  • src/utils/mapImportFormat.ts
✅ Files skipped from review due to trivial changes (1)
  • src/options.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • schema.json

Walkthrough

Two new localization file formats, APPLE_SDK and ANDROID_SDK, were added to the supported formats across the schema, type definitions, and command-line options. The mapping utilities were updated: export mapping now supports these formats with their respective message formats, while import mapping explicitly rejects them with clear errors.

Changes

Format Support Extension

Layer / File(s) Summary
Schema and Type Definitions
schema.json, src/schema.d.ts
Schema enum and TypeScript Format union extended to recognize APPLE_SDK and ANDROID_SDK as valid localization format values.
CLI Option Integration
src/options.ts
FORMAT_OPT command-line option .choices() extended to include APPLE_SDK and ANDROID_SDK format choices.
Export Format Mapping
src/utils/mapExportFormat.ts
mapExportFormat switch extended with APPLE_SDK (mapping to APPLE_SPRINTF) and ANDROID_SDK (mapping to JAVA_STRING_FORMAT) message formats.
Import Format Rejection
src/utils/mapImportFormat.ts
mapImportFormat extended with explicit cases for APPLE_SDK and ANDROID_SDK that throw InvalidArgumentError, indicating these formats are not supported for import operations.

Sequence Diagram(s)

sequenceDiagram
    participant CLI
    participant mapExportFormat
    participant Result

    CLI->>mapExportFormat: export(format)
    alt format is "APPLE_SDK"
        mapExportFormat-->>Result: { format: "APPLE_SDK", messageFormat: "APPLE_SPRINTF" }
    else format is "ANDROID_SDK"
        mapExportFormat-->>Result: { format: "ANDROID_SDK", messageFormat: "JAVA_STRING_FORMAT" }
    else other formats
        mapExportFormat-->>Result: mapped format object
    end
Loading
sequenceDiagram
    participant CLI
    participant mapImportFormat
    participant Error

    CLI->>mapImportFormat: import(format)
    alt format is "APPLE_SDK" or "ANDROID_SDK"
        mapImportFormat->>Error: throw InvalidArgumentError("Import not supported")
    else other formats
        mapImportFormat-->>CLI: return mapped format
    end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

Two new formats hop into the scene,
Apple and Android, shiny and clean.
Export with style, but import? Not quite—
A bunny throws errors to keep things right!
With mappings in place and choices so clear,
This patch hops along—review with cheer! 🥕

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding two new export formats (Apple SDK and Android SDK) that are reflected across all modified files in the changeset.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 jirikuchynka/export-format-android-apple-sdk

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

@Anty0 Anty0 requested a review from JanCizmar July 30, 2025 13:22
@Anty0 Anty0 force-pushed the jirikuchynka/export-format-android-apple-sdk branch from 10356c6 to bcbf8c2 Compare June 15, 2026 16:12
@Anty0 Anty0 merged commit 8325426 into main Jun 15, 2026
16 checks passed
@Anty0 Anty0 deleted the jirikuchynka/export-format-android-apple-sdk branch June 15, 2026 16:20
TolgeeMachine added a commit that referenced this pull request Jun 15, 2026
# [2.18.0](v2.17.0...v2.18.0) (2026-06-15)

### Features

* add export formats Apple SDK and Android SDK ([#184](#184)) ([8325426](8325426))
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 2.18.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants