Skip to content

Update translatte commands#2099

Merged
frozenhelium merged 1 commit intodevelopfrom
project/translatte
Mar 27, 2026
Merged

Update translatte commands#2099
frozenhelium merged 1 commit intodevelopfrom
project/translatte

Conversation

@frozenhelium
Copy link
Copy Markdown
Member

@frozenhelium frozenhelium commented Nov 14, 2025

Changes

  • Add tracking of currently applied migration
  • Update push migrations to check for currently applied migration
  • Add mechanisms to push migrations to the IFRC translation service
  • Integrate with cacheppuccino for translation strings

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Nov 14, 2025

⚠️ No Changeset found

Latest commit: 5a85291

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@frozenhelium frozenhelium changed the title fix(translatte): update commands Update translatte commands Nov 14, 2025
@frozenhelium frozenhelium force-pushed the project/translatte branch 2 times, most recently from 9b3c8de to 99be76e Compare January 29, 2026 06:52
@frozenhelium frozenhelium force-pushed the project/translatte branch 5 times, most recently from bebce77 to 9155563 Compare January 29, 2026 10:39
@frozenhelium frozenhelium requested a review from tnagorra January 29, 2026 10:40
@frozenhelium frozenhelium force-pushed the project/translatte branch 2 times, most recently from 2f55826 to 41e063c Compare January 29, 2026 10:56
@frozenhelium frozenhelium marked this pull request as ready for review January 29, 2026 11:05
@frozenhelium frozenhelium force-pushed the project/translatte branch 4 times, most recently from d92474e to 233396f Compare February 26, 2026 08:41
@frozenhelium frozenhelium force-pushed the project/translatte branch 4 times, most recently from 7219d55 to ec970d6 Compare March 24, 2026 09:48
@frozenhelium frozenhelium merged commit c25e066 into develop Mar 27, 2026
22 checks passed
@frozenhelium frozenhelium deleted the project/translatte branch March 27, 2026 04:13
Comment thread .github/workflows/ci.yml
APP_RISK_API_ENDPOINT: 'https://go-risk-staging.northeurope.cloudapp.azure.com/api/v1/'
APP_TINY_API_KEY: 'dummy-api-key'
APP_TITLE: 'IFRC Go Test'
APP_TRANSLATION_API_ENDPOINT: 'https://cacheppuccino-alpha-1.ifrc-go.dev.togglecorp.com/'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let's just add a dummy URL here.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It is used to generate the typings


console.info(duplicateStr);

throw `Error: found divirging migrations!`;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Typo?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Msot liekly

throw `Error: found divirging migrations!`;
}

console.info('All good! No divirging migrations!');
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Typo?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

yse!

Comment thread app/package.json
"lint:js": "eslint src",
"lint:css": "stylelint \"./src/**/*.css\"",
"lint:translation": "pnpm translatte:lint",
"lint:translation": "pnpm translatte:lint && pnpm translatte:lint-migrations",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why do we need a separate lint-migrations command?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It checks for "divirging" migrations

useRiskLazyRequest,
useRiskRequest,
useTranslationLazyRequest,
// useTranslationRequest,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let's also define and export useTranslationRequest?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It will be unused and knip will throw an error

const defaultHeaders: HeadersInit = {
Authorization: token ? `Token ${token}` : '',
};
// FIXME: only inject on go apis
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is the FIXME still needed?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

No!

return serverStrings;
}

/*
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do we need this commented out function?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Probably not!

Comment on lines +16 to +19
import pushMigrationsToIfrc from './commands/pushMigrationsToIfrc';
import pushStringsFromExcelToIfrc from './commands/pushStringsFromExcelToIfrc';
import lintMigrations from './commands/lintMigrations';
import pushMigrationsToGo from './commands/pushMigrationsToGo';
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What is the difference between:

  • pushMigrationsToIfrc
  • pushMigrationsToGo
  • pushStringsFromExcelToIfrc

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

pushMigrationsToIfrc pushes migrations to IFRC Translation service
pushMigrationsToGo pushes migrations to GO API server
pushStringsFromExcelToIfrc pushes strings in excel to the IFRC translation service

)
.command(
'lint-migrations <MIGRATION_DIR_PATH>',
'Lint migration files for divirging migrations',
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is divirging a typo?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

colud be

import { resolveUrl } from "../utils";

// FIXME: get this from params
const applicationId = 18;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We should also add a FIXME to get params for "supported lanaguages"

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