Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translation pt br #1238

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

Cicatelli
Copy link

@Cicatelli Cicatelli commented Oct 3, 2024

Added Brazilian Portuguese language to the translation system and added translator codes to the operator view

Adicionado ao sistema de tradução o idioma português brasileiro e adicionado códigos do tradutor a visualização do operador

Copy link
Contributor

coderabbitai bot commented Oct 3, 2024

Walkthrough

This pull request introduces localization enhancements across multiple components, including MessageControl, TimerControlsPreview, AuxTimer, and others. It integrates the useTranslation hook to replace hardcoded strings with localized versions using the getLocalizedString function. Additionally, new key-value pairs are added to the German translation file, expanding the internationalization capabilities of the application.

Changes

File Path Change Summary
apps/client/src/features/control/message/MessageControl.tsx Added useTranslation import and replaced hardcoded strings in TimerMessageInput and ExternalInput with localized versions.
apps/client/src/features/control/message/TimerViewControl.tsx Added useTranslation import and replaced hardcoded button labels in TimerControlsPreview with localized versions.
apps/client/src/features/control/playback/aux-timer/AuxTimer.tsx Added useTranslation import and replaced the static label "Auxiliary Timer" with a localized string.
apps/client/src/features/control/playback/playback-timer/PlaybackTimer.tsx Added useTranslation import and replaced hardcoded labels "Started at" and "Expect end" with localized strings.
apps/client/src/features/overview/Overview.tsx Added useTranslation import and replaced hardcoded labels in several overview components with localized strings.
apps/client/src/features/rundown/event-block/EventBlock.utils.ts Added useTranslation import and modified formatOverlap to return a localized string instead of a hardcoded one.
apps/client/src/features/rundown/event-block/EventBlockInner.tsx Added useTranslation import and replaced static text for "UP NEXT" with a localized string.
apps/client/src/features/rundown/event-editor/EventEditor.tsx Added useTranslation import and replaced hardcoded labels with localized versions for "Custom Fields" and "Manage".
apps/client/src/features/rundown/event-editor/composite/EventEditorTimes.tsx Added useTranslation import and replaced hardcoded labels for various fields with localized strings.
apps/client/src/features/rundown/event-editor/composite/EventEditorTitles.tsx Added useTranslation import and replaced static labels for input fields with localized versions.
apps/client/src/features/rundown/quick-add-block/QuickAddBlock.tsx Added useTranslation import and replaced button labels with localized strings.
apps/client/src/features/rundown/rundown-header/RundownHeader.tsx Added useTranslation import and replaced static button labels with localized versions.
apps/client/src/features/rundown/rundown-header/RundownMenu.tsx Added useTranslation import and replaced various static strings with localized versions.
apps/client/src/translation/languages/de.ts Added multiple new key-value pairs for localization, including terms related to timers and editors.

Possibly related PRs

  • feat: timeline view #1131: The changes in this PR introduce localization support for the Timeline component, which is related to the main PR's focus on enhancing internationalization capabilities in various components, including MessageControl. Both PRs involve the integration of the useTranslation hook and the getLocalizedString function to replace hardcoded strings with localized versions.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 9

🧹 Outside diff range and nitpick comments (2)
apps/client/src/translation/TranslationProvider.tsx (1)

29-29: LGTM: Brazilian Portuguese added to translationsList.

The 'ptbr' entry has been correctly added to the translationsList object, mapping to the imported langPtbr.

Consider maintaining alphabetical order in the translationsList object for consistency and easier maintenance. You might want to move the 'ptbr' entry just after the 'pt' entry.

apps/client/src/features/operator/status-bar/StatusBarTimers.tsx (1)

75-75: Consider consistency in localization key naming

The localization key for the "Running timer" label uses a different prefix ('countdown.running') compared to the other labels that use 'common.*'. While this isn't necessarily wrong, it might be worth considering consistency across your localization keys.

If "Running timer" is a common term used across the application, you might want to change it to 'common.running_timer' for consistency:

-        <span className={styles.label}>{getLocalizedString('countdown.running')}</span>
+        <span className={styles.label}>{getLocalizedString('common.running_timer')}</span>

However, if it's specific to the countdown feature, the current key is appropriate. In that case, consider adding a comment explaining why this key is different from the others.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 86e6f8b and 44c730b.

📒 Files selected for processing (12)
  • apps/client/src/features/app-settings/panel/general-panel/GeneralPanelForm.tsx (1 hunks)
  • apps/client/src/features/operator/status-bar/StatusBarTimers.tsx (3 hunks)
  • apps/client/src/translation/TranslationProvider.tsx (4 hunks)
  • apps/client/src/translation/languages/de.ts (1 hunks)
  • apps/client/src/translation/languages/en.ts (1 hunks)
  • apps/client/src/translation/languages/es.ts (1 hunks)
  • apps/client/src/translation/languages/fr.ts (1 hunks)
  • apps/client/src/translation/languages/hu.ts (1 hunks)
  • apps/client/src/translation/languages/it.ts (1 hunks)
  • apps/client/src/translation/languages/no.ts (1 hunks)
  • apps/client/src/translation/languages/pl.ts (1 hunks)
  • apps/client/src/translation/languages/pt-br.ts (1 hunks)
🔇 Additional comments (18)
apps/client/src/translation/languages/no.ts (2)

16-16: ⚠️ Potential issue

Fix spelling and provide Norwegian translation

There are a couple of issues with the newly added translation:

  1. There's a spelling error in the key: 'commom' should be 'common'.
  2. The value is in English, but this file is for Norwegian translations.

Please apply the following changes:

-  'commom.elapsed_time': 'Elapsed Time',
+  'common.elapsed_time': 'Forløpt tid',

Note: I've provided a suggested Norwegian translation, but please verify with a native Norwegian speaker or professional translator to ensure accuracy.

To ensure consistency and proper usage, let's check for any existing usages of this key in the codebase:

#!/bin/bash
# Search for usages of 'common.elapsed_time' or 'commom.elapsed_time' in the codebase
rg -i "('|\")comm?om\.elapsed_time('|\")"

This will help identify any places where the key is already being used, which might need updating.


16-16: Ensure consistency with translation structure and style

While adding the new translation, please consider the following:

  1. Verify that 'common.elapsed_time' is defined in the English translation file (en.ts) to maintain consistency across language files.
  2. Ensure the Norwegian translation aligns with the terminology and style used in other translations. For example, 'time' is translated as 'tid' in other entries.

To check the consistency with the English file and other usages, run the following script:

This will help ensure that the new translation fits well with the existing structure and terminology.

apps/client/src/translation/languages/en.ts (2)

Line range hint 1-30: LGTM: Good placement and structure

The new translation key is well-placed within the 'common' group, maintaining the file's logical structure. The overall consistency of the file is preserved, and the TranslationObject type correctly ensures type safety for the translations.


Line range hint 1-30: Clarify PR objectives vs. actual changes

The PR description mentions adding Brazilian Portuguese language support and incorporating translator codes into the operator's view. However, the changes we see here are limited to adding a new English translation key. Could you please clarify:

  1. Where are the Brazilian Portuguese translations added?
  2. Where are the changes related to translator codes in the operator's view?
  3. Is this addition to the English translations file intentional and part of the PR objectives?

This will help ensure that all intended changes are properly reviewed and implemented.

To help verify the extent of changes, you can run the following script:

apps/client/src/translation/languages/it.ts (1)

Line range hint 1-30: Ensure PR changes align with stated objectives

The changes in this file (adding an Italian translation) don't seem to align with the PR objectives of adding Brazilian Portuguese translations and translator codes to the operator's view. It's important to maintain focus and consistency in pull requests to facilitate easier review and integration.

Let's verify if there are any changes related to Brazilian Portuguese translations:

If these searches don't yield results, it might indicate that the PR description doesn't accurately reflect the changes made. Please ensure that all changes are relevant to the PR's stated objectives, or update the PR description to accurately reflect the changes made.

apps/client/src/translation/languages/es.ts (2)

Line range hint 1-30: LGTM for the rest of the file

The remainder of the file looks good. The structure is consistent, and the translations appear to be correct Spanish translations for the given keys.


Line range hint 1-30: Clarify PR scope and file relevance

I noticed a discrepancy between the PR objectives and the file being reviewed:

  1. The PR title and description mention adding Brazilian Portuguese translations.
  2. However, this file (es.ts) contains Spanish translations.

Could you please clarify:

  1. Is this Spanish file intended to be part of this PR?
  2. If so, what is the relationship between the Spanish translations and the stated objective of adding Brazilian Portuguese?
  3. Are there other files in this PR that contain the Brazilian Portuguese translations?

This clarification will help ensure that the PR accurately reflects its intended changes and that all necessary files are included and reviewed.

To help verify the PR contents, you can run the following script:

apps/client/src/translation/languages/de.ts (1)

Line range hint 1-30: LGTM for the rest of the file

The structure and content of the German translation file are appropriate and consistent, aside from the issue mentioned in the previous comment.

apps/client/src/translation/languages/pt-br.ts (4)

1-3: LGTM: Import and type declaration look good.

The import of TranslationObject from the English language file and the type declaration for langPtbr are correct and consistent with the expected structure for language files.


4-15: LGTM: Common translations look accurate.

The translations for common terms and phrases appear to be correct and consistent with Brazilian Portuguese.


17-27: LGTM: Countdown and timeline translations are accurate.

The translations for countdown and timeline sections are correct and consistent with Brazilian Portuguese.


1-27: Overall, great job on the Brazilian Portuguese translations!

The file is well-structured and consistent with other language files. The translations are accurate and cover all necessary phrases. There's just one minor typo to fix in the 'common.elapsed_time' key.

Great work on enhancing the multilingual capabilities of the system!

apps/client/src/translation/TranslationProvider.tsx (2)

5-5: LGTM: Brazilian Portuguese language import added correctly.

The import statement for langPtbr is properly placed and follows the established naming convention and file path pattern for language imports.


66-74: Interface structure looks good, but placement needs review.

The StatusBarTimersProps interface is well-defined with appropriate types and optional properties. However, its placement in the TranslationProvider file seems unexpected.

Could you clarify why this interface is being added to the TranslationProvider file? It appears to be unrelated to translation functionality. Consider moving it to a more appropriate location, such as a file dedicated to StatusBar components or types.

To verify the usage and potential better placement of this interface, let's run the following script:

This script will help us understand where StatusBarTimersProps is being used and if there are more suitable files for its placement.

apps/client/src/features/operator/status-bar/StatusBarTimers.tsx (4)

29-30: LGTM: Proper usage of useTranslation hook

The destructuring of getLocalizedString from the useTranslation hook is correctly implemented. This sets up the component for internationalization, allowing for easy translation of strings.


67-67: LGTM: Proper localization of "Time now" label

The hardcoded string for the "Time now" label has been correctly replaced with a call to getLocalizedString. The key 'common.time_now' is appropriate and consistent with common internationalization practices.


81-81: LGTM: Proper localization of "Scheduled start" and "Scheduled end" labels

The hardcoded strings for the "Scheduled start" and "Scheduled end" labels have been correctly replaced with calls to getLocalizedString. The keys 'common.scheduled_start' and 'common.scheduled_end' are appropriate and consistent with the naming pattern used for other common strings.

Also applies to: 85-85


Line range hint 1-89: Overall assessment: Good implementation of internationalization

The changes made to this component successfully implement internationalization, allowing for easier translation of the UI. Most of the changes are well-implemented, with only a few minor issues:

  1. The import path for useTranslation is unnecessarily complex and could be simplified.
  2. There's a typo in the localization key for "Elapsed time" ('commom' instead of 'common').
  3. There's a slight inconsistency in the naming of the "Running timer" localization key.

Once these minor issues are addressed, the internationalization implementation in this component will be excellent. Great job on improving the multilingual support of the application!

@@ -11,6 +11,7 @@ export const langEn = {
'common.stage_timer': 'Stage Timer',
'common.started_at': 'Started At',
'common.time_now': 'Time now',
'commom.elapsed_time': 'Elapsed Time',
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix typo in the new translation key

There's a typo in the newly added translation key. It should be 'common.elapsed_time' instead of 'commom.elapsed_time'.

Please apply the following change:

-  'commom.elapsed_time': 'Elapsed Time',
+  'common.elapsed_time': 'Elapsed Time',

This will ensure consistency with other keys in the object that use 'common' as a prefix.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
'commom.elapsed_time': 'Elapsed Time',
'common.elapsed_time': 'Elapsed Time',

@@ -13,6 +13,7 @@ export const langHu: TranslationObject = {
'common.stage_timer': 'Színpadi időzítő',
'common.started_at': 'Kezdődött',
'common.time_now': 'Jelenlegi idő',
'commom.elapsed_time': 'Elapsed Time',
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

⚠️ Potential issue

Fix the key typo across all translation files and ensure proper translations

The key 'commom.elapsed_time' contains a typo and should be corrected to 'common.elapsed_time' in all translation files. Additionally, ensure that the value for each language is appropriately translated.

Issues Identified:

  1. Key Typo:

    • 'commom.elapsed_time' should be 'common.elapsed_time' in all files:
      • pl.ts
      • pt-br.ts
      • no.ts
      • it.ts
      • fr.ts
      • hu.ts
      • en.ts
      • es.ts
      • de.ts
  2. Incomplete Translations:

    • Except for pt-br.ts, the value 'Elapsed Time' is in English. These should be translated to the respective languages.

Suggested Changes:

-  'commom.elapsed_time': 'Elapsed Time',
+  'common.elapsed_time': '<Translated Value>',

Replace <Translated Value> with the appropriate translation for each language.

🔗 Analysis chain

Correct the key typo and provide Hungarian translation

There are two issues with the newly added translation:

  1. The key contains a typo: 'commom.elapsed_time' should be 'common.elapsed_time'.
  2. The value 'Elapsed Time' is in English, not Hungarian, which is inconsistent with the rest of the file.

Please apply the following changes:

  1. Correct the key spelling.
  2. Provide the Hungarian translation for 'Elapsed Time'.

Here's a suggested correction (please verify the Hungarian translation):

-  'commom.elapsed_time': 'Elapsed Time',
+  'common.elapsed_time': 'Eltelt idő',

To ensure consistency across the codebase, let's check for any other occurrences of 'elapsed_time' in translation files:

This will help us verify if the correct key is used in other language files and if they all have proper translations.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for 'elapsed_time' in all translation files
rg --type typescript 'elapsed_time' apps/client/src/translation/languages/

Length of output: 109


Script:

#!/bin/bash
# Search for 'elapsed_time' in all TypeScript translation files
rg --type ts 'elapsed_time' apps/client/src/translation/languages/

Length of output: 835

@@ -13,6 +13,7 @@ export const langIt: TranslationObject = {
'common.stage_timer': 'Orologio Palco',
'common.started_at': 'Iniziato Alle',
'common.time_now': 'Ora attuale',
'commom.elapsed_time': 'Elapsed Time',
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

⚠️ Potential issue

Fix typos and translations across all language files

Several issues were found with the translation keys and values across multiple language files:

  1. Typo in key: The key 'commom.elapsed_time' should be corrected to 'common.elapsed_time' in all language files to maintain consistency.
  2. Missing translations: The value for 'commom.elapsed_time' is in English ('Elapsed Time') instead of the respective languages, except for pt-br.ts which has the correct Portuguese translation.

Affected files:

  • apps/client/src/translation/languages/pt-br.ts
  • apps/client/src/translation/languages/pl.ts
  • apps/client/src/translation/languages/no.ts
  • apps/client/src/translation/languages/it.ts
  • apps/client/src/translation/languages/fr.ts
  • apps/client/src/translation/languages/hu.ts
  • apps/client/src/translation/languages/en.ts
  • apps/client/src/translation/languages/es.ts
  • apps/client/src/translation/languages/de.ts

Actions needed:

  1. Correct the key to 'common.elapsed_time' in all affected language files.
  2. Provide appropriate translations for 'Elapsed Time' in each language file to ensure proper localization.

Suggested correction example:

-  'commom.elapsed_time': 'Elapsed Time',
+  'common.elapsed_time': 'Tempo trascorso',
🔗 Analysis chain

Fix typo and translation, and clarify relevance to PR objectives

There are several issues with this new addition:

  1. There's a typo in the key: 'commom' should be 'common' to maintain consistency with other keys.
  2. The value 'Elapsed Time' is in English, not Italian. It should be translated to Italian.
  3. This change doesn't seem to align with the PR objectives of adding Brazilian Portuguese translations and translator codes.

Please address these issues:

  1. Correct the key to 'common.elapsed_time'.
  2. Translate 'Elapsed Time' to Italian.
  3. Clarify how this change relates to the PR objectives or consider removing it if it's not relevant.

Here's a suggested correction for the Italian translation:

-  'commom.elapsed_time': 'Elapsed Time',
+  'common.elapsed_time': 'Tempo trascorso',

To ensure consistency and completeness, let's check for similar keys in other language files:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for 'elapsed_time' key in all language files
rg --type typescript 'elapsed_time' apps/client/src/translation/languages/

Length of output: 564


Script:

#!/bin/bash
# Search for both correct and incorrect 'elapsed_time' keys in all TypeScript language files
rg --type typescript '(commom|common)\.elapsed_time' apps/client/src/translation/languages/

Length of output: 128


Script:

#!/bin/bash
# Search for both correct and incorrect 'elapsed_time' keys in all TypeScript (.ts) language files
rg -g "*.ts" '(commom|common)\.elapsed_time' apps/client/src/translation/languages/

Length of output: 854

@@ -13,6 +13,7 @@ export const langEs: TranslationObject = {
'common.stage_timer': 'Temporizador de presentador',
'common.started_at': 'Iniciado en',
'common.time_now': 'Ahora',
'commom.elapsed_time': 'Elapsed Time',
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix typographical error and provide Spanish translation

There are a few issues with the new translation entry:

  1. There's a typographical error in the key: 'commom' should be 'common'.
  2. The value 'Elapsed Time' is in English, not Spanish.
  3. This inconsistency breaks the pattern established by other entries.

Please apply the following changes:

-  'commom.elapsed_time': 'Elapsed Time',
+  'common.elapsed_time': 'Tiempo transcurrido',

This correction:

  • Fixes the typo in the key
  • Provides the correct Spanish translation
  • Maintains consistency with other entries in the file
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
'commom.elapsed_time': 'Elapsed Time',
'common.elapsed_time': 'Tiempo transcurrido',

@@ -13,6 +13,7 @@ export const langDe: TranslationObject = {
'common.stage_timer': 'Bühnen-Timer',
'common.started_at': 'Gestartet am',
'common.time_now': 'Aktuelle Zeit',
'commom.elapsed_time': 'Elapsed Time',
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix typo and provide German translation for 'elapsed time'

There are a few issues with this new translation entry:

  1. There's a typo in the key: 'commom' should be 'common'.
  2. The translation is in English, not German.
  3. This change seems unrelated to the PR's objective of adding Brazilian Portuguese translations.

Please apply the following changes:

-  'commom.elapsed_time': 'Elapsed Time',
+  'common.elapsed_time': 'Verstrichene Zeit',

Also, consider moving this addition to a separate PR focused on updating German translations, as it's unrelated to the current PR's objective of adding Brazilian Portuguese support.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
'commom.elapsed_time': 'Elapsed Time',
'common.elapsed_time': 'Verstrichene Zeit',

'common.stage_timer': 'TEMPO DO APRESENTADOR',
'common.started_at': 'INICIADO ÀS',
'common.time_now': 'HORA ATUAL',
'commom.elapsed_time': 'TEMPO CORRIDO',
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix typo in translation key.

There's a typo in the key 'commom.elapsed_time'. It should be 'common.elapsed_time'.

Please apply the following change:

-  'commom.elapsed_time': 'TEMPO CORRIDO',
+  'common.elapsed_time': 'TEMPO CORRIDO',
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
'commom.elapsed_time': 'TEMPO CORRIDO',
'common.elapsed_time': 'TEMPO CORRIDO',

@@ -8,6 +8,7 @@ import ClockTime from '../../viewers/common/clock-time/ClockTime';
import RunningTime from '../../viewers/common/running-time/RunningTime';

import styles from './StatusBar.module.scss';
import { useTranslation } from '../../../../../client/src/translation/TranslationProvider';
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Consider simplifying the import path for useTranslation

The current import path '../../../../../client/src/translation/TranslationProvider' seems unnecessarily long and complex. This could make the code harder to maintain and may indicate an issue with the project structure or import resolution.

Consider simplifying this import path. You might be able to use a shorter path or set up path aliases in your project configuration to make imports more manageable. For example:

import { useTranslation } from '@/translation/TranslationProvider';

This assumes you've set up path aliases in your TypeScript or webpack configuration.

<ClockTime className={styles.timer} value={clock} />
</div>
<div className={styles.elapsedTime}>
<span className={styles.label}>Elapsed time</span>
<span className={styles.label}>{getLocalizedString('commom.elapsed_time')}</span>
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix typo in localization key for "Elapsed time"

There's a typo in the localization key for the "Elapsed time" label. The current key is 'commom.elapsed_time', which should be 'common.elapsed_time'.

Please correct the typo to ensure proper translation:

-        <span className={styles.label}>{getLocalizedString('commom.elapsed_time')}</span>
+        <span className={styles.label}>{getLocalizedString('common.elapsed_time')}</span>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<span className={styles.label}>{getLocalizedString('commom.elapsed_time')}</span>
<span className={styles.label}>{getLocalizedString('common.elapsed_time')}</span>

Comment on lines +155 to +158
<option value='ptbr'>Português Brasil</option>
<option value='es'>Spanish</option>
<option value='sv'>Swedish</option>
<option value='pl'>Polish</option>
<option value='pl'>Polish</option>
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

Issue Detected: 'ptbr' Language Code Not Fully Integrated

The ptbr language code is added to the language selection dropdown but is not registered in the application's language configuration or localization files. This may prevent the application from properly handling Brazilian Portuguese language settings.

  • Action Required:
    • Register 'ptbr' in the language configuration files.
    • Add necessary localization entries for 'ptbr' to support Brazilian Portuguese translations.
🔗 Analysis chain

LGTM! The changes align with the PR objectives.

The addition of the "Português Brasil" option and the indentation fix for the "Polish" option improve the language selection capabilities and code consistency. These changes successfully implement the PR's goal of adding Brazilian Portuguese language support.

To ensure consistency with the application's language handling system, please verify that the 'ptbr' language code is correctly recognized and implemented throughout the application. Run the following script to check for its usage:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the usage of 'ptbr' language code across the application

# Test: Search for 'ptbr' usage in TypeScript and JavaScript files
echo "Searching for 'ptbr' usage in TypeScript and JavaScript files:"
rg --type-add 'web:*.{ts,tsx,js,jsx}' --type web "'ptbr'" -g '!**/node_modules/**'

# Test: Search for other occurrences of 'Português Brasil' or similar
echo "Searching for other occurrences of 'Português Brasil' or similar:"
rg --type-add 'web:*.{ts,tsx,js,jsx}' --type web "Portugu[eê]s\s*Brasil" -g '!**/node_modules/**'

# Test: Check for language-related configuration files
echo "Checking for language-related configuration files:"
fd -e json -e yaml -e yml -e config "lang|locale|i18n"

Length of output: 930


Script:

#!/bin/bash
# Description: Verify 'ptbr' registration in language configuration and i18n setup

# Test: Search for 'ptbr' in language configuration files
echo "Searching for 'ptbr' in language configuration files:"
rg --type-add 'config:*.{json,yaml,yml}' --type config "'ptbr'" -g '!**/node_modules/**'

# Test: Search for 'ptbr' in localization or translation files
echo "Searching for 'ptbr' in localization or translation files:"
rg --type-add 'local:*.{json,ts}' --type local "'ptbr'" -g '!**/node_modules/**'

Length of output: 441

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Outside diff range and nitpick comments (1)
apps/client/src/translation/languages/pt.ts (1)

Line range hint 1-3: Consider adding a comment to specify the Portuguese dialect

The translations in this file appear to be in Brazilian Portuguese. To avoid any confusion and to help future maintainers, it would be beneficial to add a comment specifying the dialect.

Consider adding a comment at the beginning of the file, like this:

 import { TranslationObject } from './en';
 
+// Brazilian Portuguese translations
 export const langPt: TranslationObject = {

This will make it clear that these translations are specifically for Brazilian Portuguese, aligning with the PR objectives.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 44c730b and 58a6d96.

📒 Files selected for processing (12)
  • apps/client/src/features/operator/status-bar/StatusBarTimers.tsx (3 hunks)
  • apps/client/src/translation/languages/de.ts (1 hunks)
  • apps/client/src/translation/languages/en.ts (2 hunks)
  • apps/client/src/translation/languages/es.ts (1 hunks)
  • apps/client/src/translation/languages/fr.ts (1 hunks)
  • apps/client/src/translation/languages/hu.ts (1 hunks)
  • apps/client/src/translation/languages/it.ts (1 hunks)
  • apps/client/src/translation/languages/no.ts (1 hunks)
  • apps/client/src/translation/languages/pl.ts (1 hunks)
  • apps/client/src/translation/languages/pt-br.ts (1 hunks)
  • apps/client/src/translation/languages/pt.ts (1 hunks)
  • apps/client/src/translation/languages/sv.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (10)
  • apps/client/src/features/operator/status-bar/StatusBarTimers.tsx
  • apps/client/src/translation/languages/de.ts
  • apps/client/src/translation/languages/en.ts
  • apps/client/src/translation/languages/es.ts
  • apps/client/src/translation/languages/fr.ts
  • apps/client/src/translation/languages/hu.ts
  • apps/client/src/translation/languages/it.ts
  • apps/client/src/translation/languages/no.ts
  • apps/client/src/translation/languages/pl.ts
  • apps/client/src/translation/languages/pt-br.ts
🔇 Additional comments (2)
apps/client/src/translation/languages/sv.ts (1)

Line range hint 1-30: Verify the scope of translation changes

While this file update improves the Swedish translations, it doesn't align with the PR objectives of adding Brazilian Portuguese translations and incorporating translator codes into the operator's view.

Could you please clarify if there are additional files that implement the Brazilian Portuguese translations and translator codes mentioned in the PR description? If so, ensure they are included in the PR for a comprehensive review.

To verify the presence of Brazilian Portuguese translations, you can run the following script:

apps/client/src/translation/languages/pt.ts (1)

Line range hint 1-31: Overall, the translations look good with one correction needed

The Portuguese translations in this file are generally well-structured and consistent with Brazilian Portuguese. Once the 'common.elapsed_time' translation is corrected to Portuguese and a comment is added to specify the dialect, this file will be fully aligned with the PR objectives of adding Brazilian Portuguese language support.

@@ -13,6 +13,7 @@ export const langSv: TranslationObject = {
'common.stage_timer': 'Timer för scenen',
'common.started_at': 'Började vid',
'common.time_now': 'Klockan nu',
'common.elapsed_time': 'Elapsed Time',
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Incorrect translation: 'common.elapsed_time' is not in Swedish

The newly added translation for 'common.elapsed_time' is in English instead of Swedish. This is inconsistent with the rest of the file, which contains Swedish translations.

Please replace the English text with the correct Swedish translation. The Swedish phrase for "Elapsed Time" is "Förfluten tid". Here's the corrected line:

-  'common.elapsed_time': 'Elapsed Time',
+  'common.elapsed_time': 'Förfluten tid',
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
'common.elapsed_time': 'Elapsed Time',
'common.elapsed_time': 'Förfluten tid',

@@ -13,6 +13,7 @@ export const langPt: TranslationObject = {
'common.stage_timer': 'Temporizador do presentador',
'common.started_at': 'Iniciado em',
'common.time_now': 'Hora atual',
'common.elapsed_time': 'Elapsed Time',
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Translation for 'common.elapsed_time' is in English, not Portuguese

The newly added translation for 'common.elapsed_time' is currently in English ('Elapsed Time') instead of Portuguese. This doesn't align with the purpose of this file, which is to provide Portuguese translations.

Please update the translation to Portuguese. A suggested translation could be:

-  'common.elapsed_time': 'Elapsed Time',
+  'common.elapsed_time': 'Tempo decorrido',

Make sure to verify this translation with a native Portuguese speaker or a professional translator to ensure accuracy.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
'common.elapsed_time': 'Elapsed Time',
'common.elapsed_time': 'Tempo decorrido',

Implementation of variables in the texts on the editor screen so that they use the variables from the translation system.

The number of translation variables has been increased.

The language is already correct in English and Brazilian Portuguese; for other languages, the variables for each language must be translated.
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 28

🧹 Outside diff range and nitpick comments (24)
apps/client/src/features/rundown/rundown-header/RundownHeader.tsx (1)

22-22: LGTM: Button labels correctly internationalized

The replacement of static button labels with getLocalizedString calls is correct and implements the translation feature as intended. This change enhances the user experience for non-English speakers.

For consistency, consider extracting the translation keys as constants at the top of the file. This can help with maintenance and reduce the risk of typos. For example:

const TRANSLATION_KEYS = {
  RUN: 'editor.run',
  EDIT: 'editor.edit',
} as const;

// Then use them like this:
{getLocalizedString(TRANSLATION_KEYS.RUN)}
{getLocalizedString(TRANSLATION_KEYS.EDIT)}

Also applies to: 25-25

apps/client/src/features/control/message/MessageControl.tsx (2)

20-25: LGTM: Localization implemented correctly for TimerMessageInput.

The useTranslation hook is properly utilized to localize the label and placeholder text. This enhances the component's internationalization capabilities.

Consider destructuring getLocalizedString directly in the function parameters for consistency with React hooks usage:

function TimerMessageInput() {
  const { text, visible } = useTimerMessageInput();
  const { getLocalizedString } = useTranslation();
  // ... rest of the function
}

This approach is more idiomatic in React and can slightly improve readability.


45-50: LGTM: Localization implemented correctly for ExternalInput.

The useTranslation hook is properly utilized to localize the label and placeholder text, consistent with the changes in TimerMessageInput. This further enhances the component's internationalization capabilities.

As suggested for TimerMessageInput, consider destructuring getLocalizedString directly in the function parameters:

function ExternalInput() {
  const { text, visible } = useExternalMessageInput();
  const { getLocalizedString } = useTranslation();
  // ... rest of the function
}

This maintains consistency across the component and aligns with idiomatic React practices.

apps/client/src/features/rundown/event-block/EventBlock.utils.ts (2)

Line range hint 25-48: Localization implemented, but logic change needs attention.

The changes successfully implement localization for the gap string. However, there are a few points to consider:

  1. The logic for determining overlap vs. gap has changed. Previously, both cases were handled, but now 'Overlap' is only returned if timeFromPrevious is negative, while 'Gap' is always included in the localized string. This might not be the intended behavior.

  2. The formatting of the return string has changed. It now includes a dash (-) which wasn't present before. Ensure this is intentional.

  3. Consider using template literals for better readability:

return `${timeFromPrevious < 0 ? 'Overlap ' : ''}${getLocalizedString('editor.gap')} - ${overlapString}`;
  1. The space after 'Overlap' in the ternary operator might lead to inconsistent spacing. Consider moving it to the localized string if needed.

Please review these changes to ensure they align with the intended functionality.


48-49: Remove unnecessary empty lines.

The extra empty lines at the end of the formatOverlap function are not needed. Consider removing them to maintain consistent code style.

apps/client/src/features/control/message/TimerViewControl.tsx (2)

34-34: LGTM: Localized button labels for auxiliary and external timers

The button labels are now correctly using getLocalizedString for localization. The keys are descriptive and follow a logical naming convention.

Consider extracting these translation keys to a constants file for better maintainability and to avoid potential typos in the future. For example:

// in a constants file
export const TRANSLATION_KEYS = {
  TIMER: {
    SHOW_AUXTIME: 'timer.show_auxtime',
    SHOW_EXTERNAL: 'timer.show_external',
    // ... other keys
  },
  // ... other categories
};

// in this file
import { TRANSLATION_KEYS } from './path/to/constants';

// ...
{getLocalizedString(TRANSLATION_KEYS.TIMER.SHOW_AUXTIME)}

This approach can help centralize all translation keys and make it easier to manage them as the application grows.

Also applies to: 41-41


Line range hint 1-65: Overall assessment: Successful implementation of localization

The changes in this file successfully implement localization for all button labels in the TimerControlsPreview component. The modifications are consistent and align well with the PR objective of adding translation support.

To further improve the code:

  1. Consider implementing the suggestion to extract translation keys to a constants file for better maintainability.
  2. If not already done, ensure that the Brazilian Portuguese translations for these keys are added to the translation files.
  3. Consider adding unit tests to verify that the correct localized strings are being used for each button label.

Great job on implementing the localization feature!

apps/client/src/features/rundown/event-editor/composite/EventEditorTitles.tsx (1)

30-32: LGTM: useTranslation hook added correctly. Consider removing empty line.

The useTranslation hook is correctly used, and getLocalizedString is appropriately destructured. However, the empty line at 32 can be removed for better code organization.

Consider applying this change:

  const { getLocalizedString } = useTranslation();
-

  return (
apps/client/src/features/rundown/rundown-header/RundownMenu.tsx (1)

Line range hint 1-71: Overall, excellent implementation of localization in RundownMenu component.

The changes successfully implement localization throughout the RundownMenu component, replacing all hardcoded strings with localized versions. This aligns well with the PR objective of adding Brazilian Portuguese language support and enhances the component's internationalization capabilities.

Key improvements:

  1. Proper import and usage of the useTranslation hook.
  2. Consistent use of getLocalizedString for all user-facing text.
  3. Appropriate key naming conventions (e.g., 'editor.clear', 'global.cancel').

These changes will greatly improve the accessibility of the application for Portuguese-speaking users and set a good foundation for future language additions.

Consider creating a centralized file for translation keys to maintain consistency and ease future updates across the application.

apps/client/src/translation/languages/en.ts (4)

18-29: LGTM: Timer-related translations added with minor suggestion

The new 'timer' prefixed translations have been added successfully. They provide clear meanings for timer-related UI elements and include helpful placeholders for context.

For consistency, consider capitalizing 'blink' in the 'timer.blink' translation:

-  'timer.blink': 'blink',
+  'timer.blink': 'Blink',

30-45: LGTM: Editor-related translations added with minor suggestions

The new 'editor' prefixed translations have been added successfully, providing clear meanings for various editor-related UI elements.

Consider the following minor improvements for consistency:

  1. Add a space after the colon for 'editor.event' and 'editor.delay':
-  'editor.event':'Event',
-  'editor.delay':'Delay',
+  'editor.event': 'Event',
+  'editor.delay': 'Delay',
  1. Consider using sentence case for 'editor.upnext' to maintain consistency with other translations:
-  'editor.upnext': 'UP NEXT',
+  'editor.upnext': 'Up Next',

50-63: LGTM: Global translations and alert message added successfully

The new 'global' prefixed translations and the alert message for clearing the rundown have been added correctly. They provide clear and concise translations for various UI elements and actions.

Consider removing the extra space in 'global.delete':

-  'global.delete':  'Delete',
+  'global.delete': 'Delete',

74-75: Remove unnecessary empty lines

Consider removing the two empty lines at the end of the file to maintain a clean and consistent code style.

  'timeline.due': 'due',
  'timeline.followedby': 'Followed by',
-
-
};
apps/client/src/features/control/playback/aux-timer/AuxTimer.tsx (2)

18-18: LGTM: Implementation of localized string

The useTranslation hook is correctly used to obtain the getLocalizedString function, which is then applied to replace the static "Auxiliary Timer" label. This change effectively implements internationalization for this component.

Consider extracting the translation key 'common.aux_time' into a constant at the top of the file or in a separate constants file. This can improve maintainability and reduce the risk of typos when reusing the key. For example:

const TRANSLATION_KEYS = {
  AUX_TIME: 'common.aux_time',
} as const;

// Then use it like this:
{getLocalizedString(TRANSLATION_KEYS.AUX_TIME)}

Also applies to: 34-34


Line range hint 76-76: Consider internationalizing the placeholder text

While the main label has been internationalized, the placeholder text in the AuxTimerInput component is still hardcoded. For consistency, consider internationalizing this text as well.

You could modify the AuxTimerInput component like this:

function AuxTimerInput() {
  const time = useAuxTimerTime();
  const { setDuration } = setAuxTimer;
  const { getLocalizedString } = useTranslation();

  // ... rest of the component ...

  return (
    <TimeInput<'auxTimer'>
      submitHandler={handleTimeUpdate}
      name='auxTimer'
      time={time}
      placeholder={getLocalizedString('common.aux_timer_placeholder')}
    />
  );
}

Don't forget to add the new translation key to your translation files.

apps/client/src/translation/languages/hu.ts (1)

Line range hint 1-65: Complete Hungarian translations for newly added terms

Thank you for expanding the Hungarian language support in this file. The structure and keys appear to be correct, and the previously mentioned typo in the 'common.elapsed_time' key has been fixed. However, the main issue is that all newly added translations are still in English.

To complete this task:

  1. Translate all newly added terms from English to Hungarian.
  2. Ensure that the translations accurately convey the meaning of each term in the context of the user interface.
  3. Pay special attention to technical terms and UI-specific language to maintain clarity and consistency with the application's functionality.
  4. Consider consulting with a native Hungarian speaker or professional translator to verify the accuracy and naturalness of the translations.

Once the translations are complete, this file will significantly enhance the Hungarian language support for the application.

If you need any assistance in organizing or managing the translation process, please let me know, and I'd be happy to help.

apps/client/src/translation/languages/pt.ts (1)

Line range hint 1-65: Ensure all entries are translated to Portuguese

Thank you for adding new entries to the Portuguese translation file. However, it's crucial to ensure that all entries are actually translated to Portuguese, not just added in English. This applies to all the new entries added in this pull request.

Here are some general guidelines for maintaining this translation file:

  1. Translate all text values to Portuguese, keeping the keys in English.
  2. Pay attention to context and technical terms to ensure accurate translations.
  3. Maintain consistency in formatting and capitalization across similar entries.
  4. Consider cultural nuances and localization best practices for Brazilian Portuguese.

After implementing the suggested translations, please have a native Portuguese speaker or a professional translator review the changes to ensure accuracy and natural phrasing.

apps/client/src/features/control/playback/playback-timer/PlaybackTimer.tsx (2)

76-76: LGTM: Localization applied correctly to JSX elements.

The hardcoded strings have been appropriately replaced with calls to getLocalizedString, using logical key names. This change successfully implements localization for these UI elements.

For consistency, consider updating the "Roll: Countdown to start" string on line 73 to use localization as well:

-          <span className={style.rolltag}>Roll: Countdown to start</span>
+          <span className={style.rolltag}>{getLocalizedString('common.roll_countdown')}</span>

Also applies to: 80-80


Line range hint 1-89: Summary: Localization successfully implemented in PlaybackTimer component.

The changes in this file effectively implement localization for the PlaybackTimer component. The addition of the useTranslation hook and the replacement of hardcoded strings with getLocalizedString function calls are well-executed and consistent. These modifications align with the PR objectives of adding Brazilian Portuguese language support and enhancing the system's multilingual capabilities.

The changes maintain the original functionality while improving the component's adaptability to different languages. This update will contribute to a better user experience for Portuguese-speaking users and potentially other language users in the future.

As the project continues to expand its multilingual support, consider implementing a centralized string management system (e.g., using JSON files for each supported language) to ease the maintenance and addition of new languages in the future.

apps/client/src/features/rundown/quick-add-block/QuickAddBlock.tsx (1)

81-81: LGTM: Button labels internationalized correctly.

The hardcoded button labels have been appropriately replaced with calls to getLocalizedString, enabling dynamic translation based on the user's language preferences. This change aligns well with the PR objective of adding translation support.

For consistency, consider extracting these translation keys as constants at the top of the file or in a separate constants file. This would make it easier to maintain and update the keys in the future. For example:

const TRANSLATION_KEYS = {
  EVENT: 'editor.event',
  DELAY: 'editor.delay',
  BLOCK: 'editor.block',
};

// Then use them like this:
{getLocalizedString(TRANSLATION_KEYS.EVENT)}

Also applies to: 91-91, 101-101

apps/client/src/features/rundown/event-editor/EventEditor.tsx (1)

108-110: LGTM: Strings internationalized correctly.

The hardcoded strings have been properly replaced with calls to getLocalizedString, which is the correct approach for internationalization. The keys used are appropriate and seem to follow a global naming convention.

For consistency, consider wrapping the getLocalizedString('global.manage') call in curly braces, like this:

<Button variant='ontime-subtle' size='sm' onClick={handleOpenCustomManager}>
  {getLocalizedString('global.manage')}
</Button>

This makes it clearer that it's a JavaScript expression and maintains consistency with other JSX usage in the file.

apps/client/src/features/rundown/event-block/EventBlockInner.tsx (1)

Line range hint 84-102: LGTM: Localization implemented for "UP NEXT" tag

The "UP NEXT" text is now correctly localized using the getLocalizedString function from the translation hook. This improves the component's internationalization capabilities.

Consider adding a comment explaining the purpose of the 'editor.upnext' key for better maintainability:

- {isNext && <span className={style.nextTag}>{getLocalizedString('editor.upnext')} </span>}
+ {isNext && <span className={style.nextTag}>{getLocalizedString('editor.upnext')} {/* Localized "UP NEXT" text */}</span>}
apps/client/src/features/overview/Overview.tsx (2)

27-27: LGTM: Localization implemented in _EditorOverview

The implementation of localization using getLocalizedString is consistent and aligns with the PR objectives. Good job on using descriptive keys for the translations.

For improved consistency, consider extracting the getLocalizedString call to a constant at the beginning of the component, similar to how you've handled other derived values. This could make the JSX more readable:

const scheduledStartLabel = getLocalizedString('common.scheduled_start');
const startedAtLabel = getLocalizedString('common.started_at');
// ... other labels ...

// Then in JSX:
<TimeRow label={scheduledStartLabel} value={formatedTime(plannedStart)} className={style.start} />

This is a minor suggestion and the current implementation is perfectly acceptable.

Also applies to: 36-37, 43-45


Line range hint 1-144: Overall: Excellent implementation of localization

Great job on implementing localization across all components in this file. The changes are consistent, follow good practices, and align well with the PR objectives of adding Brazilian Portuguese language support.

A minor optimization to consider:
Since getLocalizedString is used in multiple components, you might want to create a custom hook that combines useTranslation with memoization of frequently used strings. This could potentially improve performance and reduce redundant code. For example:

function useLocalizedStrings() {
  const { getLocalizedString } = useTranslation();
  return useMemo(() => ({
    scheduledStart: getLocalizedString('common.scheduled_start'),
    startedAt: getLocalizedString('common.started_at'),
    // ... other frequently used strings
  }), [getLocalizedString]);
}

Then in your components, you could use:

const strings = useLocalizedStrings();
// ...
<TimeRow label={strings.scheduledStart} value={formatedTime(plannedStart)} className={style.start} />

This is just a suggestion for potential future optimization and is not necessary for the current implementation, which is already well done.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 58a6d96 and 405d8aa.

📒 Files selected for processing (24)
  • apps/client/src/features/control/message/MessageControl.tsx (3 hunks)
  • apps/client/src/features/control/message/TimerViewControl.tsx (5 hunks)
  • apps/client/src/features/control/playback/aux-timer/AuxTimer.tsx (2 hunks)
  • apps/client/src/features/control/playback/playback-timer/PlaybackTimer.tsx (3 hunks)
  • apps/client/src/features/overview/Overview.tsx (7 hunks)
  • apps/client/src/features/rundown/event-block/EventBlock.utils.ts (3 hunks)
  • apps/client/src/features/rundown/event-block/EventBlockInner.tsx (3 hunks)
  • apps/client/src/features/rundown/event-editor/EventEditor.tsx (3 hunks)
  • apps/client/src/features/rundown/event-editor/composite/EventEditorTimes.tsx (3 hunks)
  • apps/client/src/features/rundown/event-editor/composite/EventEditorTitles.tsx (3 hunks)
  • apps/client/src/features/rundown/quick-add-block/QuickAddBlock.tsx (5 hunks)
  • apps/client/src/features/rundown/rundown-header/RundownHeader.tsx (1 hunks)
  • apps/client/src/features/rundown/rundown-header/RundownMenu.tsx (3 hunks)
  • apps/client/src/translation/languages/de.ts (1 hunks)
  • apps/client/src/translation/languages/en.ts (2 hunks)
  • apps/client/src/translation/languages/es.ts (1 hunks)
  • apps/client/src/translation/languages/fr.ts (1 hunks)
  • apps/client/src/translation/languages/hu.ts (1 hunks)
  • apps/client/src/translation/languages/it.ts (1 hunks)
  • apps/client/src/translation/languages/no.ts (1 hunks)
  • apps/client/src/translation/languages/pl.ts (1 hunks)
  • apps/client/src/translation/languages/pt-br.ts (1 hunks)
  • apps/client/src/translation/languages/pt.ts (1 hunks)
  • apps/client/src/translation/languages/sv.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/client/src/translation/languages/pt-br.ts
🔇 Additional comments (51)
apps/client/src/features/rundown/rundown-header/RundownHeader.tsx (2)

9-10: LGTM: Proper implementation of translation hook

The addition of the useTranslation import and its usage within the component is correct and aligns with the PR objective of adding translation support. This change enhances the internationalization capabilities of the RundownHeader component.

Also applies to: 16-16


9-10: Summary: Successful implementation of internationalization

The changes in this file successfully implement internationalization for the RundownHeader component. The addition of the useTranslation hook and the replacement of static strings with getLocalizedString calls are well-executed and align perfectly with the PR objective of adding translation support.

These modifications enhance the component's ability to display text in different languages, improving the application's accessibility for non-English speaking users, particularly those who speak Brazilian Portuguese as mentioned in the PR description.

The changes are minimal, targeted, and do not introduce any potential issues or bugs. They follow React best practices and maintain the existing functionality while adding the new translation feature.

Also applies to: 16-16, 22-22, 25-25

apps/client/src/features/control/message/MessageControl.tsx (2)

6-7: LGTM: Translation hook import added correctly.

The useTranslation hook is imported from the correct local module, which is a good practice for implementing localization.


Line range hint 1-56: Overall: Excellent implementation of localization support.

The changes effectively introduce localization to the MessageControl component. The useTranslation hook is consistently used across both TimerMessageInput and ExternalInput functions, replacing hardcoded strings with localized versions. This significantly enhances the internationalization capabilities of the component.

A few minor suggestions were made for improving code consistency and readability, but these are not critical. The implementation is solid and achieves the goal of adding Brazilian Portuguese language support as mentioned in the PR objectives.

apps/client/src/features/rundown/event-block/EventBlock.utils.ts (2)

11-11: LGTM: Import statement for translation function added.

The import statement for useTranslation is correctly placed and necessary for the localization changes in the formatOverlap function.


Line range hint 1-49: Summary: Localization implemented, but further review needed.

The changes successfully introduce localization to the formatOverlap function, which aligns with the PR objectives of adding Brazilian Portuguese language support. However, there are a few areas that require attention:

  1. The logic for determining overlap vs. gap has changed, which may affect the function's behavior.
  2. The formatting of the return string has been modified, including the addition of a dash.
  3. There are minor code style issues, such as unnecessary empty lines.

To ensure these changes don't introduce unintended side effects, please run the following verification:

This script will help identify areas of the codebase that might be affected by the changes to formatOverlap. Please review the results to ensure that the modifications align with the expected behavior across the application.

✅ Verification successful

Follow-Up Verification Scripts

Please run the following updated verification script to gather the necessary information:


Verification Successful: No issues found

The localization enhancements to the formatOverlap function are correctly implemented and thoroughly tested. The 'editor.gap' translation key is consistently used across all relevant files, and the test coverage ensures the function behaves as expected in various scenarios.

  • formatOverlap is utilized in RundownIndicators.tsx and adequately covered by tests in __tests__/EventBlock.utils.test.ts.
  • The 'editor.gap' key is properly localized in all supported language files.
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for usage of formatOverlap function and potential impacts

# Search for usage of formatOverlap function
echo "Searching for usage of formatOverlap function:"
rg --type typescript "formatOverlap\(" -A 5

# Search for tests related to formatOverlap
echo "Searching for tests related to formatOverlap:"
rg --type typescript "test.*formatOverlap" -A 10

# Search for other occurrences of 'editor.gap' translation key
echo "Searching for other occurrences of 'editor.gap' translation key:"
rg --type typescript "('|\")editor\.gap('|\")"

Length of output: 603


Script:

#!/bin/bash
# Description: Check for usage of formatOverlap function and potential impacts

# Search for usage of formatOverlap function
echo "Searching for usage of formatOverlap function:"
rg "formatOverlap\(" --glob "*.ts" --glob "*.tsx" -A 5

# Search for tests related to formatOverlap
echo "Searching for tests related to formatOverlap:"
rg "test.*formatOverlap" --glob "*.ts" --glob "*.tsx" -A 10

# Search for other occurrences of 'editor.gap' translation key
echo "Searching for other occurrences of 'editor.gap' translation key:"
rg "('|\")editor\.gap('|\")" --glob "*.ts" --glob "*.tsx"

Length of output: 8945

apps/client/src/features/control/message/TimerViewControl.tsx (3)

9-10: LGTM: Import statement for useTranslation

The import statement for useTranslation is correctly placed and aligns with the PR objective of adding translation support.


22-23: LGTM: Proper usage of useTranslation hook

The useTranslation hook is correctly used, and destructuring getLocalizedString is a good practice. This setup enables the localization of button labels as intended.


52-52: LGTM: Localized button labels for blink and blackout functions

The button labels for blink and blackout functions are now correctly using getLocalizedString for localization. The keys are concise and follow the same naming convention as the previous set.

The suggestion from the previous comment about extracting translation keys to a constants file applies here as well.

Also applies to: 61-61

apps/client/src/features/rundown/event-editor/composite/EventEditorTitles.tsx (6)

12-12: LGTM: Import statement for useTranslation added correctly.

The import statement for useTranslation is correctly placed and necessary for the localization changes in the component.


38-38: LGTM: eventId label correctly localized.

The eventId label has been properly localized using the getLocalizedString function with an appropriate key.


49-49: LGTM: Cue label in EventTextInput correctly localized.

The label for the cue input has been properly localized using the getLocalizedString function with the 'global.cue' key, which seems appropriate for potential reuse across the application.


52-52: LGTM: Colour label correctly localized.

The colour label has been properly localized using the getLocalizedString function with the 'global.colour' key, maintaining consistency with other global string keys.


55-56: LGTM: Title and Note labels correctly localized in EventTextInput and EventTextArea.

The labels for the title and note inputs have been properly localized using the getLocalizedString function with appropriate keys ('global.title' and 'global.note'). This maintains consistency with other global string keys and correctly implements localization for these fields.


Line range hint 1-62: Overall: Excellent implementation of localization in EventEditorTitles component.

The changes in this file successfully implement localization for the EventEditorTitles component. All hardcoded strings have been replaced with localized versions using the getLocalizedString function from the useTranslation hook. This implementation aligns well with the PR objectives of adding Brazilian Portuguese language support and enhances the component's internationalization capabilities.

Key points:

  1. Consistent use of getLocalizedString for all labels.
  2. Appropriate key naming convention (e.g., 'global.title', 'editor.eventid').
  3. Existing functionality and structure of the component are preserved.

These changes will significantly improve the accessibility of the application for Portuguese-speaking users while maintaining a flexible structure for potential future language additions.

apps/client/src/features/rundown/rundown-header/RundownMenu.tsx (4)

18-19: LGTM: Import statement for useTranslation is correctly added.

The import statement for useTranslation is properly placed and correctly references the TranslationProvider. This addition enables the use of localization features in the component.


34-35: LGTM: useTranslation hook is correctly implemented.

The useTranslation hook is properly used to extract the getLocalizedString function. This setup allows for efficient access to localized strings throughout the component.


46-46: LGTM: "Clear rundown" button text is properly localized.

The hardcoded "Clear rundown" text has been correctly replaced with a localized version using getLocalizedString('editor.clear'). This change enhances the component's internationalization capabilities.


59-62: LGTM: AlertDialog buttons are properly localized.

The "Cancel" and "Delete all" button texts have been correctly replaced with localized versions using appropriate global keys. This change contributes to the overall internationalization of the component and maintains consistency across the application.

apps/client/src/translation/languages/en.ts (2)

14-17: LGTM: New 'common' translations added successfully

The new 'common' prefixed translations have been added correctly. They are consistent with the existing style and provide clear, concise translations for important UI elements.


46-49: LGTM: End action translations added successfully

The new 'endaction' prefixed translations have been added correctly. They provide clear and concise translations for various end action options.

apps/client/src/features/control/playback/aux-timer/AuxTimer.tsx (1)

14-14: LGTM: Import statement for internationalization

The import statement for useTranslation is correctly added and aligns with the existing import style. This import is necessary for implementing the internationalization changes.

apps/client/src/translation/languages/sv.ts (1)

16-19: ⚠️ Potential issue

Translations need to be in Swedish

The newly added 'common' translations are in English instead of Swedish. This is inconsistent with the rest of the file, which contains Swedish translations. Please provide the correct Swedish translations for these terms:

  1. 'common.elapsed_time' should be 'Förfluten tid' (as mentioned in the previous review)
  2. 'common.progress' should be 'Framsteg'
  3. 'common.offset' should be 'Förskjutning'
  4. 'common.aux_time' should be 'Hjälptimer'
apps/client/src/translation/languages/pt.ts (1)

16-19: ⚠️ Potential issue

Convert 'common' translations to Portuguese

The newly added 'common' translations are currently in English. To align with the purpose of this file, please translate these to Portuguese:

-  'common.elapsed_time': 'Elapsed Time',
-  'common.progress': 'Progress',
-  'common.offset': 'Offset',
-  'common.aux_time': 'Auxiliary Timer',
+  'common.elapsed_time': 'Tempo decorrido',
+  'common.progress': 'Progresso',
+  'common.offset': 'Deslocamento',
+  'common.aux_time': 'Temporizador auxiliar',

Please verify these translations with a native Portuguese speaker or a professional translator to ensure accuracy.

apps/client/src/features/control/playback/playback-timer/PlaybackTimer.tsx (2)

11-11: LGTM: Import statement for localization added correctly.

The import statement for useTranslation is correctly added and is necessary for the localization changes implemented in the component.


56-56: LGTM: Translation hook used correctly.

The useTranslation hook is properly utilized to extract the getLocalizedString function, which will be used for localizing strings in the component.

apps/client/src/translation/languages/de.ts (1)

16-16: ⚠️ Potential issue

Fix typo and provide German translation for 'elapsed time'

This entry was mentioned in a previous review comment. The issues still persist:

  1. There's a typo in the key: 'commom' should be 'common'.
  2. The translation is in English, not German.

Please apply the following change:

-  'common.elapsed_time': 'Elapsed Time',
+  'common.elapsed_time': 'Verstrichene Zeit',

Likely invalid or redundant comment.

apps/client/src/features/rundown/quick-add-block/QuickAddBlock.tsx (3)

10-10: LGTM: Import statement for internationalization added correctly.

The import of useTranslation from the TranslationProvider is correctly placed and necessary for the internationalization changes in this component.


27-27: LGTM: Translation hook implemented correctly.

The useTranslation hook is properly utilized to extract the getLocalizedString function. This change aligns well with the PR objective of adding translation support to the component.


Line range hint 1-104: Summary: Internationalization successfully implemented.

The changes in this file successfully implement internationalization support for the QuickAddBlock component. The modifications include:

  1. Importing the necessary translation hook.
  2. Using the getLocalizedString function to replace hardcoded button labels.

These changes align well with the PR objective of adding Brazilian Portuguese language support to the translation system. The implementation is consistent and correct, with only a minor suggestion for improvement regarding the organization of translation keys.

Great job on enhancing the multilingual capabilities of the system!

apps/client/src/features/rundown/event-editor/EventEditor.tsx (3)

19-19: LGTM: Import statement for translation hook added correctly.

The import statement for useTranslation from the TranslationProvider has been added correctly. This is a necessary step for implementing internationalization in the component.


76-76: LGTM: Translation hook used correctly.

The useTranslation hook is properly utilized to obtain the getLocalizedString function. This setup allows for easy integration of translated strings within the component.


Line range hint 1-138: Summary: Successful implementation of internationalization.

The changes made to this file successfully implement internationalization for the EventEditor component. The useTranslation hook is properly imported and utilized, and hardcoded strings have been replaced with localized versions. These modifications align well with the PR objectives of adding Brazilian Portuguese language support.

The implementation follows React best practices and doesn't introduce any apparent issues or bugs. This update enhances the component's multilingual capabilities, improving accessibility for users of different languages, including Portuguese speakers.

apps/client/src/features/rundown/event-editor/composite/EventEditorTimes.tsx (9)

12-12: LGTM: Import statement for useTranslation

The import statement for useTranslation is correctly added and is consistent with the file's import style. This import is necessary for the internationalization changes implemented in the component.


74-75: LGTM: Proper use of useTranslation hook

The useTranslation hook is correctly used to obtain the getLocalizedString function. This is placed appropriately at the beginning of the component, following React hooks best practices.


79-79: LGTM: Internationalization of "Event schedule" label

The "Event schedule" label is correctly updated to use getLocalizedString, supporting internationalization. The translation key 'editor.event_schedule' appears appropriate and consistent with naming conventions.


97-97: LGTM: Internationalization of "Warning Time" label

The "Warning Time" label is correctly updated to use getLocalizedString, supporting internationalization. The translation key 'editor.warning_time' is appropriate and consistent with the naming convention used.


102-102: LGTM: Internationalization of "Timer Type" label and options

The "Timer Type" label and its select options are correctly updated to use getLocalizedString, supporting internationalization. The translation keys (e.g., 'editor.timer_type', 'timer.countdown', etc.) are appropriate and follow a consistent naming convention.

Also applies to: 110-113


118-118: LGTM: Internationalization of "Danger Time" label

The "Danger Time" label is correctly updated to use getLocalizedString, supporting internationalization. The translation key 'editor.danger_time' is appropriate and consistent with the naming convention used.


123-123: LGTM: Internationalization of "End Action" label and options

The "End Action" label and its select options are correctly updated to use getLocalizedString, supporting internationalization. The translation keys (e.g., 'editor.end_action', 'endaction.none', etc.) are appropriate and follow a consistent naming convention.

Also applies to: 131-134


140-140: LGTM: Internationalization of "Event Visibility" label

The "Event Visibility" label is correctly updated to use getLocalizedString, supporting internationalization. The translation key 'editor.event_visibility' is appropriate and consistent with the naming convention used.


Line range hint 1-153: Overall assessment: Successful internationalization implementation

The changes in this file effectively implement internationalization support for the EventEditorTimes component. Most UI elements now use getLocalizedString for text rendering, which allows for easy translation to different languages. The translation keys used are consistent and follow a logical naming convention (e.g., 'editor.', 'timer.', 'endaction.' prefixes).

The component's core functionality remains unchanged, ensuring that these updates only affect the text display and not the underlying logic. This approach to internationalization is clean and maintainable.

One minor improvement was suggested for the visibility switch label to ensure complete coverage of internationalization.

Great job on improving the accessibility and global reach of the application!

apps/client/src/features/rundown/event-block/EventBlockInner.tsx (2)

23-23: LGTM: Translation hook import added correctly

The import of useTranslation from the TranslationProvider is correctly placed and necessary for the localization changes in this component.


Line range hint 53-59: LGTM: Default values added to props

Adding default values for isPublic and skip props improves the component's robustness. These changes align with the updated EventBlockInnerProps interface mentioned in the summary.

apps/client/src/features/overview/Overview.tsx (6)

11-11: LGTM: Import statement for useTranslation

The import statement for useTranslation is correctly placed and consistent with the PR objectives of adding translation support.


67-67: LGTM: Localization implemented in _CuesheetOverview

The implementation of localization in _CuesheetOverview is consistent with the changes in _EditorOverview and aligns with the PR objectives. The reuse of translation keys across components is a good practice for maintaining consistency in the UI.

Also applies to: 78-80


107-109: LGTM: Localization implemented in CurrentBlockOverview

The implementation of localization in CurrentBlockOverview is consistent with previous changes and aligns with the PR objectives. The translation key 'common.elapsed_time' is descriptive and follows the established pattern.


116-118: LGTM: Localization implemented in TimerOverview

The implementation of localization in TimerOverview is consistent with previous changes and aligns with the PR objectives.

I noticed that the translation key 'countdown.running' follows a slightly different pattern compared to the 'common.*' keys used elsewhere. Is this intentional? If so, it might be helpful to add a comment explaining the different categorization for future maintainers.

Could you clarify the reasoning behind using 'countdown.running' instead of 'common.running' or a similar key?


127-129: LGTM: Localization implemented in ProgressOverview

The implementation of localization in ProgressOverview is consistent with previous changes and aligns with the PR objectives. The translation key 'common.progress' follows the established pattern.


137-142: LGTM: Localization implemented in RuntimeOverview

The implementation of localization in RuntimeOverview is consistent with previous changes and aligns with the PR objectives. The translation keys 'common.offset' and 'common.time_now' follow the established pattern.

apps/client/src/translation/languages/it.ts (1)

16-65: Translations need to be in Italian

The new translation entries from lines 16 to 65 have English values. Since this is the Italian translation file, please provide the correct Italian translations for these keys to maintain consistency and proper localization.

Comment on lines +52 to +55
'{getLocalizedString('editor.clear')}'
</AlertDialogHeader>
<AlertDialogBody>
You will lose all data in your rundown. <br /> Are you sure?
{getLocalizedString('alert.clear_rundown')}
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

AlertDialog content is localized, but remove extra quotes in header.

The AlertDialog content has been properly localized, enhancing the component's internationalization. However, there's an issue in the AlertDialogHeader:

Remove the extra single quotes around the localized string in the AlertDialogHeader. Apply this change:

- '{getLocalizedString('editor.clear')}'
+ {getLocalizedString('editor.clear')}

This will ensure the localized string is rendered correctly without additional quotes.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
'{getLocalizedString('editor.clear')}'
</AlertDialogHeader>
<AlertDialogBody>
You will lose all data in your rundown. <br /> Are you sure?
{getLocalizedString('alert.clear_rundown')}
{getLocalizedString('editor.clear')}
</AlertDialogHeader>
<AlertDialogBody>
{getLocalizedString('alert.clear_rundown')}

'global.colour': 'Colour',
'global.custom_fields': 'Custom Fields',
'global.manage': 'Manage',
'alert.clear_rundown': 'You will lose all data in your rundown. Are you sure?',
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Translate alert message to Norwegian

The new alert message is in English instead of Norwegian. To maintain consistency and provide a fully localized experience, this should be translated.

Please translate the alert message to Norwegian. For example:

-  'alert.clear_rundown': 'You will lose all data in your rundown. Are you sure?',
+  'alert.clear_rundown': 'Du vil miste alle data i kjøreplanen din. Er du sikker?',

Ensure the translation accurately conveys the meaning of the original message in Norwegian.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
'alert.clear_rundown': 'You will lose all data in your rundown. Are you sure?',
'alert.clear_rundown': 'Du vil miste alle data i kjøreplanen din. Er du sikker?',

Comment on lines +16 to +19
'common.elapsed_time': 'Elapsed Time',
'common.progress': 'Progress',
'common.offset': 'Offset',
'common.aux_time': 'Auxiliary Timer',
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Translate new entries to Norwegian

The new entries for common terms are currently in English. As this is the Norwegian language file, these should be translated to Norwegian to maintain consistency and fulfill the file's purpose.

Please translate the following entries to Norwegian:

  • 'common.elapsed_time'
  • 'common.progress'
  • 'common.offset'
  • 'common.aux_time'

For example:

-  'common.elapsed_time': 'Elapsed Time',
+  'common.elapsed_time': 'Forløpt tid',

Committable suggestion was skipped due to low confidence.

Comment on lines +20 to +31
'timer.message': 'Timer Message',
'timer.message.plac': 'Message show fullscreen stage timer',
'timer.external': 'External Message',
'timer.external.plac': 'Message show as secondary text in stage timer',
'timer.show_auxtime': 'Show Aux Timer',
'timer.show_external': 'Show External',
'timer.blink': 'blink',
'timer.blackout': 'Blackout Screen',
'timer.countdown': 'Countdown',
'timer.countup': 'Count Up',
'timer.timetoend': 'Time to End',
'timer.clock': 'Clock',
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Translate timer-related entries to Norwegian

The new timer-related entries are currently in English. These should be translated to Norwegian to ensure consistency within the language file and proper localization.

Please translate all timer-related entries to Norwegian. For example:

-  'timer.message': 'Timer Message',
+  'timer.message': 'Timermelding',

-  'timer.external': 'External Message',
+  'timer.external': 'Ekstern melding',

Ensure all entries from 'timer.message' to 'timer.clock' are properly translated.

Committable suggestion was skipped due to low confidence.

Comment on lines +32 to +47
'editor.run': 'Run',
'editor.edit': 'Edit',
'editor.event':'Event',
'editor.delay':'Delay',
'editor.block':'Block',
'editor.gap': 'Gap',
'editor.nextday': 'Next Day',
'editor.clear':'Clear Rundown',
'editor.event_schedule': 'Event Schedule',
'editor.warning_time': 'Warning Time',
'editor.danger_time': 'Danger Time',
'editor.event_visibility': 'Event Visibility',
'editor.timer_type': 'Timer Type',
'editor.end_action': 'End Action',
'editor.eventid': 'Event ID (Read Only)',
'editor.upnext': 'UP NEXT',
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Translate editor-related entries to Norwegian

The new editor-related entries are in English instead of Norwegian. To maintain the integrity of the Norwegian language file, these should be translated.

Please translate all editor-related entries to Norwegian. For example:

-  'editor.run': 'Run',
+  'editor.run': 'Kjør',

-  'editor.edit': 'Edit',
+  'editor.edit': 'Rediger',

Ensure all entries from 'editor.run' to 'editor.upnext' are properly translated to Norwegian.

Committable suggestion was skipped due to low confidence.

Comment on lines +52 to +65
'global.save': 'Save',
'global.delete': 'Delete',
'global.delete_all': 'Delete All',
'global.exit': 'Exit',
'global.cancel': 'Cancel',
'global.public': 'Public',
'global.private': 'Private',
'global.cue': 'Cue',
'global.title': 'Title',
'global.note': 'Note',
'global.colour': 'Colour',
'global.custom_fields': 'Custom Fields',
'global.manage': 'Manage',
'alert.clear_rundown': 'You will lose all data in your rundown. Are you sure?',
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Translate 'global' and 'alert' related entries to Portuguese

The 'global' and 'alert' related entries are currently in English. Please translate them to Portuguese, considering the UI context:

-  'global.save': 'Save',
-  'global.delete':  'Delete',
-  'global.delete_all': 'Delete All',
-  'global.exit': 'Exit',
-  'global.cancel': 'Cancel',
-  'global.public': 'Public',
-  'global.private': 'Private',
-  'global.cue': 'Cue',
-  'global.title': 'Title',
-  'global.note': 'Note',
-  'global.colour': 'Colour',
-  'global.custom_fields': 'Custom Fields',
-  'global.manage': 'Manage',
-  'alert.clear_rundown': 'You will lose all data in your rundown. Are you sure?',
+  'global.save': 'Salvar',
+  'global.delete': 'Excluir',
+  'global.delete_all': 'Excluir tudo',
+  'global.exit': 'Sair',
+  'global.cancel': 'Cancelar',
+  'global.public': 'Público',
+  'global.private': 'Privado',
+  'global.cue': 'Deixa',
+  'global.title': 'Título',
+  'global.note': 'Nota',
+  'global.colour': 'Cor',
+  'global.custom_fields': 'Campos personalizados',
+  'global.manage': 'Gerenciar',
+  'alert.clear_rundown': 'Você perderá todos os dados do seu roteiro. Tem certeza?',

Please verify these translations with a native Portuguese speaker or a professional translator to ensure accuracy and natural phrasing in the context of user interface elements.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
'global.save': 'Save',
'global.delete': 'Delete',
'global.delete_all': 'Delete All',
'global.exit': 'Exit',
'global.cancel': 'Cancel',
'global.public': 'Public',
'global.private': 'Private',
'global.cue': 'Cue',
'global.title': 'Title',
'global.note': 'Note',
'global.colour': 'Colour',
'global.custom_fields': 'Custom Fields',
'global.manage': 'Manage',
'alert.clear_rundown': 'You will lose all data in your rundown. Are you sure?',
'global.save': 'Salvar',
'global.delete': 'Excluir',
'global.delete_all': 'Excluir tudo',
'global.exit': 'Sair',
'global.cancel': 'Cancelar',
'global.public': 'Público',
'global.private': 'Privado',
'global.cue': 'Deixa',
'global.title': 'Título',
'global.note': 'Nota',
'global.colour': 'Cor',
'global.custom_fields': 'Campos personalizados',
'global.manage': 'Gerenciar',
'alert.clear_rundown': 'Você perderá todos os dados do seu roteiro. Tem certeza?',

Comment on lines +32 to +47
'editor.run': 'Run',
'editor.edit': 'Edit',
'editor.event':'Event',
'editor.delay':'Delay',
'editor.block':'Block',
'editor.gap': 'Gap',
'editor.nextday': 'Next Day',
'editor.clear':'Clear Rundown',
'editor.event_schedule': 'Event Schedule',
'editor.warning_time': 'Warning Time',
'editor.danger_time': 'Danger Time',
'editor.event_visibility': 'Event Visibility',
'editor.timer_type': 'Timer Type',
'editor.end_action': 'End Action',
'editor.eventid': 'Event ID (Read Only)',
'editor.upnext': 'UP NEXT',
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Translate 'editor' related entries to Portuguese

The 'editor' related entries are currently in English. Please translate them to Portuguese, paying special attention to technical terms:

-  'editor.run': 'Run',
-  'editor.edit': 'Edit',
-  'editor.event':'Event',
-  'editor.delay':'Delay',
-  'editor.block':'Block',
-  'editor.gap': 'Gap',
-  'editor.nextday': 'Next Day',
-  'editor.clear':'Clear Rundown',
-  'editor.event_schedule': 'Event Schedule',
-  'editor.warning_time': 'Warning Time',
-  'editor.danger_time': 'Danger Time',
-  'editor.event_visibility': 'Event Visibility',
-  'editor.timer_type': 'Timer Type',
-  'editor.end_action': 'End Action',
-  'editor.eventid': 'Event ID (Read Only)',
-  'editor.upnext': 'UP NEXT',
+  'editor.run': 'Executar',
+  'editor.edit': 'Editar',
+  'editor.event': 'Evento',
+  'editor.delay': 'Atraso',
+  'editor.block': 'Bloco',
+  'editor.gap': 'Intervalo',
+  'editor.nextday': 'Próximo dia',
+  'editor.clear': 'Limpar roteiro',
+  'editor.event_schedule': 'Programação do evento',
+  'editor.warning_time': 'Tempo de aviso',
+  'editor.danger_time': 'Tempo crítico',
+  'editor.event_visibility': 'Visibilidade do evento',
+  'editor.timer_type': 'Tipo de temporizador',
+  'editor.end_action': 'Ação final',
+  'editor.eventid': 'ID do evento (Somente leitura)',
+  'editor.upnext': 'A SEGUIR',

Please verify these translations with a native Portuguese speaker or a professional translator to ensure accuracy and appropriate use of technical terms in Portuguese.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
'editor.run': 'Run',
'editor.edit': 'Edit',
'editor.event':'Event',
'editor.delay':'Delay',
'editor.block':'Block',
'editor.gap': 'Gap',
'editor.nextday': 'Next Day',
'editor.clear':'Clear Rundown',
'editor.event_schedule': 'Event Schedule',
'editor.warning_time': 'Warning Time',
'editor.danger_time': 'Danger Time',
'editor.event_visibility': 'Event Visibility',
'editor.timer_type': 'Timer Type',
'editor.end_action': 'End Action',
'editor.eventid': 'Event ID (Read Only)',
'editor.upnext': 'UP NEXT',
'editor.run': 'Executar',
'editor.edit': 'Editar',
'editor.event': 'Evento',
'editor.delay': 'Atraso',
'editor.block': 'Bloco',
'editor.gap': 'Intervalo',
'editor.nextday': 'Próximo dia',
'editor.clear': 'Limpar roteiro',
'editor.event_schedule': 'Programação do evento',
'editor.warning_time': 'Tempo de aviso',
'editor.danger_time': 'Tempo crítico',
'editor.event_visibility': 'Visibilidade do evento',
'editor.timer_type': 'Tipo de temporizador',
'editor.end_action': 'Ação final',
'editor.eventid': 'ID do evento (Somente leitura)',
'editor.upnext': 'A SEGUIR',

Comment on lines +16 to +65
'common.elapsed_time': 'Elapsed Time',
'common.progress': 'Progress',
'common.offset': 'Offset',
'common.aux_time': 'Auxiliary Timer',
'timer.message': 'Timer Message',
'timer.message.plac': 'Message show fullscreen stage timer',
'timer.external': 'External Message',
'timer.external.plac': 'Message show as secondary text in stage timer',
'timer.show_auxtime': 'Show Aux Timer',
'timer.show_external': 'Show External',
'timer.blink': 'blink',
'timer.blackout': 'Blackout Screen',
'timer.countdown': 'Countdown',
'timer.countup': 'Count Up',
'timer.timetoend': 'Time to End',
'timer.clock': 'Clock',
'editor.run': 'Run',
'editor.edit': 'Edit',
'editor.event':'Event',
'editor.delay':'Delay',
'editor.block':'Block',
'editor.gap': 'Gap',
'editor.nextday': 'Next Day',
'editor.clear':'Clear Rundown',
'editor.event_schedule': 'Event Schedule',
'editor.warning_time': 'Warning Time',
'editor.danger_time': 'Danger Time',
'editor.event_visibility': 'Event Visibility',
'editor.timer_type': 'Timer Type',
'editor.end_action': 'End Action',
'editor.eventid': 'Event ID (Read Only)',
'editor.upnext': 'UP NEXT',
'endaction.none': 'None',
'endaction.stop': 'Stop',
'endaction.load': 'Load Next',
'endaction.play': 'Play Next',
'global.save': 'Save',
'global.delete': 'Delete',
'global.delete_all': 'Delete All',
'global.exit': 'Exit',
'global.cancel': 'Cancel',
'global.public': 'Public',
'global.private': 'Private',
'global.cue': 'Cue',
'global.title': 'Title',
'global.note': 'Note',
'global.colour': 'Colour',
'global.custom_fields': 'Custom Fields',
'global.manage': 'Manage',
'alert.clear_rundown': 'You will lose all data in your rundown. Are you sure?',
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

⚠️ Potential issue

Issue Found: Unrelated and Untranslated Entries in German Translation File

The changes in apps/client/src/translation/languages/de.ts are unrelated to the PR's objective of adding Brazilian Portuguese translations. Additionally, the new entries added are in English instead of German. This inconsistency needs to be addressed:

  1. Revert the changes to de.ts in the current PR.
  2. Create a separate PR dedicated to updating German translations, ensuring all entries are correctly translated to German.
🔗 Analysis chain

Changes are inconsistent with PR objective and file purpose

The changes in this file appear to be unrelated to the PR's objective of adding Brazilian Portuguese translations. This file is for German translations (de.ts), but most of the new entries are in English. This inconsistency needs to be addressed:

  1. These changes should be moved to a separate PR focused on updating German translations.
  2. All new entries should be properly translated into German before being added to this file.

To resolve this, please:

  1. Revert these changes in the current PR.
  2. Create a new PR specifically for updating German translations.
  3. Ensure all entries are correctly translated to German in the new PR.

To confirm that these are the only changes to German translations in this PR, run:

Would you like assistance in creating a separate PR for these German translation updates?

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for changes in German translation files
git diff origin/main -- '**/de.ts' '**/de.json'

Length of output: 83


Script:

#!/bin/bash
# List all remote branches to identify the correct main branch name
git branch -r

Length of output: 62


Script:

#!/bin/bash
# Check for changes in German translation files against origin/master
git diff origin/master -- '**/de.ts' '**/de.json'

Length of output: 2454

Comment on lines +143 to +145
{isPublic ? 'Public' : 'Private'}


Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Update visibility switch label for internationalization

The visibility switch label still uses hardcoded strings 'Public' and 'Private'. To maintain consistency with the internationalization efforts in the rest of the component, consider updating these strings to use getLocalizedString.

Here's a suggested change:

-          {isPublic ? 'Public' : 'Private'} 
+          {isPublic ? getLocalizedString('visibility.public') : getLocalizedString('visibility.private')}

Make sure to add the corresponding translation keys to your translation files.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{isPublic ? 'Public' : 'Private'}
{isPublic ? getLocalizedString('visibility.public') : getLocalizedString('visibility.private')}

Comment on lines +16 to +65
'common.elapsed_time': 'Elapsed Time',
'common.progress': 'Progress',
'common.offset': 'Offset',
'common.aux_time': 'Auxiliary Timer',
'timer.message': 'Timer Message',
'timer.message.plac': 'Message show fullscreen stage timer',
'timer.external': 'External Message',
'timer.external.plac': 'Message show as secondary text in stage timer',
'timer.show_auxtime': 'Show Aux Timer',
'timer.show_external': 'Show External',
'timer.blink': 'blink',
'timer.blackout': 'Blackout Screen',
'timer.countdown': 'Countdown',
'timer.countup': 'Count Up',
'timer.timetoend': 'Time to End',
'timer.clock': 'Clock',
'editor.run': 'Run',
'editor.edit': 'Edit',
'editor.event':'Event',
'editor.delay':'Delay',
'editor.block':'Block',
'editor.gap': 'Gap',
'editor.nextday': 'Next Day',
'editor.clear':'Clear Rundown',
'editor.event_schedule': 'Event Schedule',
'editor.warning_time': 'Warning Time',
'editor.danger_time': 'Danger Time',
'editor.event_visibility': 'Event Visibility',
'editor.timer_type': 'Timer Type',
'editor.end_action': 'End Action',
'editor.eventid': 'Event ID (Read Only)',
'editor.upnext': 'UP NEXT',
'endaction.none': 'None',
'endaction.stop': 'Stop',
'endaction.load': 'Load Next',
'endaction.play': 'Play Next',
'global.save': 'Save',
'global.delete': 'Delete',
'global.delete_all': 'Delete All',
'global.exit': 'Exit',
'global.cancel': 'Cancel',
'global.public': 'Public',
'global.private': 'Private',
'global.cue': 'Cue',
'global.title': 'Title',
'global.note': 'Note',
'global.colour': 'Colour',
'global.custom_fields': 'Custom Fields',
'global.manage': 'Manage',
'alert.clear_rundown': 'You will lose all data in your rundown. Are you sure?',
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Translate new entries to Spanish

Several new entries have values in English instead of Spanish. Since this is the Spanish translation file, please provide the appropriate Spanish translations to maintain consistency.

Apply this diff to provide the Spanish translations:

-  'common.elapsed_time': 'Elapsed Time',
+  'common.elapsed_time': 'Tiempo transcurrido',
-  'common.progress': 'Progress',
+  'common.progress': 'Progreso',
-  'common.offset': 'Offset',
+  'common.offset': 'Desfase',
-  'common.aux_time': 'Auxiliary Timer',
+  'common.aux_time': 'Temporizador auxiliar',
-  'timer.message': 'Timer Message',
+  'timer.message': 'Mensaje del temporizador',
-  'timer.message.plac': 'Message show fullscreen stage timer',
+  'timer.message.plac': 'Mensaje que se muestra en el temporizador de escenario a pantalla completa',
-  'timer.external': 'External Message',
+  'timer.external': 'Mensaje externo',
-  'timer.external.plac': 'Message show as secondary text in stage timer',
+  'timer.external.plac': 'Mensaje que se muestra como texto secundario en el temporizador de escenario',
-  'timer.show_auxtime': 'Show Aux Timer',
+  'timer.show_auxtime': 'Mostrar temporizador auxiliar',
-  'timer.show_external': 'Show External',
+  'timer.show_external': 'Mostrar externo',
-  'timer.blink': 'blink',
+  'timer.blink': 'parpadeo',
-  'timer.blackout': 'Blackout Screen',
+  'timer.blackout': 'Pantalla en negro',
-  'timer.countdown': 'Countdown',
+  'timer.countdown': 'Cuenta regresiva',
-  'timer.countup': 'Count Up',
+  'timer.countup': 'Cuenta ascendente',
-  'timer.timetoend': 'Time to End',
+  'timer.timetoend': 'Tiempo para finalizar',
-  'timer.clock': 'Clock',
+  'timer.clock': 'Reloj',
-  'editor.run': 'Run',
+  'editor.run': 'Ejecutar',
-  'editor.edit': 'Edit',
+  'editor.edit': 'Editar',
-  'editor.event': 'Event',
+  'editor.event': 'Evento',
-  'editor.delay': 'Delay',
+  'editor.delay': 'Retraso',
-  'editor.block': 'Block',
+  'editor.block': 'Bloque',
-  'editor.gap': 'Gap',
+  'editor.gap': 'Hueco',
-  'editor.nextday': 'Next Day',
+  'editor.nextday': 'Día siguiente',
-  'editor.clear': 'Clear Rundown',
+  'editor.clear': 'Borrar guion',
-  'editor.event_schedule': 'Event Schedule',
+  'editor.event_schedule': 'Programa del evento',
-  'editor.warning_time': 'Warning Time',
+  'editor.warning_time': 'Tiempo de advertencia',
-  'editor.danger_time': 'Danger Time',
+  'editor.danger_time': 'Tiempo de peligro',
-  'editor.event_visibility': 'Event Visibility',
+  'editor.event_visibility': 'Visibilidad del evento',
-  'editor.timer_type': 'Timer Type',
+  'editor.timer_type': 'Tipo de temporizador',
-  'editor.end_action': 'End Action',
+  'editor.end_action': 'Acción al finalizar',
-  'editor.eventid': 'Event ID (Read Only)',
+  'editor.eventid': 'ID de evento (Solo lectura)',
-  'editor.upnext': 'UP NEXT',
+  'editor.upnext': 'PRÓXIMO',
-  'endaction.none': 'None',
+  'endaction.none': 'Ninguno',
-  'endaction.stop': 'Stop',
+  'endaction.stop': 'Detener',
-  'endaction.load': 'Load Next',
+  'endaction.load': 'Cargar siguiente',
-  'endaction.play': 'Play Next',
+  'endaction.play': 'Reproducir siguiente',
-  'global.save': 'Save',
+  'global.save': 'Guardar',
-  'global.delete': 'Delete',
+  'global.delete': 'Eliminar',
-  'global.delete_all': 'Delete All',
+  'global.delete_all': 'Eliminar todo',
-  'global.exit': 'Exit',
+  'global.exit': 'Salir',
-  'global.cancel': 'Cancel',
+  'global.cancel': 'Cancelar',
-  'global.public': 'Public',
+  'global.public': 'Público',
-  'global.private': 'Private',
+  'global.private': 'Privado',
-  'global.cue': 'Cue',
+  'global.cue': 'Señal',
-  'global.title': 'Title',
+  'global.title': 'Título',
-  'global.note': 'Note',
+  'global.note': 'Nota',
-  'global.colour': 'Colour',
+  'global.colour': 'Color',
-  'global.custom_fields': 'Custom Fields',
+  'global.custom_fields': 'Campos personalizados',
-  'global.manage': 'Manage',
+  'global.manage': 'Gestionar',
-  'alert.clear_rundown': 'You will lose all data in your rundown. Are you sure?',
+  'alert.clear_rundown': 'Perderá todos los datos de su guion. ¿Está seguro?',
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
'common.elapsed_time': 'Elapsed Time',
'common.progress': 'Progress',
'common.offset': 'Offset',
'common.aux_time': 'Auxiliary Timer',
'timer.message': 'Timer Message',
'timer.message.plac': 'Message show fullscreen stage timer',
'timer.external': 'External Message',
'timer.external.plac': 'Message show as secondary text in stage timer',
'timer.show_auxtime': 'Show Aux Timer',
'timer.show_external': 'Show External',
'timer.blink': 'blink',
'timer.blackout': 'Blackout Screen',
'timer.countdown': 'Countdown',
'timer.countup': 'Count Up',
'timer.timetoend': 'Time to End',
'timer.clock': 'Clock',
'editor.run': 'Run',
'editor.edit': 'Edit',
'editor.event':'Event',
'editor.delay':'Delay',
'editor.block':'Block',
'editor.gap': 'Gap',
'editor.nextday': 'Next Day',
'editor.clear':'Clear Rundown',
'editor.event_schedule': 'Event Schedule',
'editor.warning_time': 'Warning Time',
'editor.danger_time': 'Danger Time',
'editor.event_visibility': 'Event Visibility',
'editor.timer_type': 'Timer Type',
'editor.end_action': 'End Action',
'editor.eventid': 'Event ID (Read Only)',
'editor.upnext': 'UP NEXT',
'endaction.none': 'None',
'endaction.stop': 'Stop',
'endaction.load': 'Load Next',
'endaction.play': 'Play Next',
'global.save': 'Save',
'global.delete': 'Delete',
'global.delete_all': 'Delete All',
'global.exit': 'Exit',
'global.cancel': 'Cancel',
'global.public': 'Public',
'global.private': 'Private',
'global.cue': 'Cue',
'global.title': 'Title',
'global.note': 'Note',
'global.colour': 'Colour',
'global.custom_fields': 'Custom Fields',
'global.manage': 'Manage',
'alert.clear_rundown': 'You will lose all data in your rundown. Are you sure?',
'common.elapsed_time': 'Tiempo transcurrido',
'common.progress': 'Progreso',
'common.offset': 'Desfase',
'common.aux_time': 'Temporizador auxiliar',
'timer.message': 'Mensaje del temporizador',
'timer.message.plac': 'Mensaje que se muestra en el temporizador de escenario a pantalla completa',
'timer.external': 'Mensaje externo',
'timer.external.plac': 'Mensaje que se muestra como texto secundario en el temporizador de escenario',
'timer.show_auxtime': 'Mostrar temporizador auxiliar',
'timer.show_external': 'Mostrar externo',
'timer.blink': 'parpadeo',
'timer.blackout': 'Pantalla en negro',
'timer.countdown': 'Cuenta regresiva',
'timer.countup': 'Cuenta ascendente',
'timer.timetoend': 'Tiempo para finalizar',
'timer.clock': 'Reloj',
'editor.run': 'Ejecutar',
'editor.edit': 'Editar',
'editor.event': 'Evento',
'editor.delay': 'Retraso',
'editor.block': 'Bloque',
'editor.gap': 'Hueco',
'editor.nextday': 'Día siguiente',
'editor.clear': 'Borrar guion',
'editor.event_schedule': 'Programa del evento',
'editor.warning_time': 'Tiempo de advertencia',
'editor.danger_time': 'Tiempo de peligro',
'editor.event_visibility': 'Visibilidad del evento',
'editor.timer_type': 'Tipo de temporizador',
'editor.end_action': 'Acción al finalizar',
'editor.eventid': 'ID de evento (Solo lectura)',
'editor.upnext': 'PRÓXIMO',
'endaction.none': 'Ninguno',
'endaction.stop': 'Detener',
'endaction.load': 'Cargar siguiente',
'endaction.play': 'Reproducir siguiente',
'global.save': 'Guardar',
'global.delete': 'Eliminar',
'global.delete_all': 'Eliminar todo',
'global.exit': 'Salir',
'global.cancel': 'Cancelar',
'global.public': 'Público',
'global.private': 'Privado',
'global.cue': 'Señal',
'global.title': 'Título',
'global.note': 'Nota',
'global.colour': 'Color',
'global.custom_fields': 'Campos personalizados',
'global.manage': 'Gestionar',
'alert.clear_rundown': 'Perderá todos los datos de su guion. ¿Está seguro?',

@cpvalente
Copy link
Owner

Hi @Cicatelli, thank you for your work here

You did not ask for a review, but from your inactivity I assume that you are finished with the code you are proposing to merge

Unfortunately we cannot consider merging the PR in the current state.
The current code mixes two proposals

  • creating a brazilian portuguese translation
  • moving the entire application to being translated

The first one is completely fine, and we could isolate the change and merge without issues. I currently did not see that much difference between the existing portuguese and would be more inclined to revise the existing portuguese translation

As for the second, this is something that we would need to discuss as it is a major project change.

It currently achieves so at the cost of every other translatio being unimplemented.

It also commits us to maintain translations for the entire interface
This means that: every time we want to add a feature, tweaks some text or label, we would need to look for translations in all the languages users have requested.

This is not sustainable and likely something we dont want to do.

The current decision is that the signage views are localisable, while the production views are always in english. Changes to this principle would need to be properly investigated and likely supported by a group of users who could provide translations on demand

I hope this does not discourage your contribution and is taken in the way that is meant.
In short: If you would extract the translation changes, those can easily be reviewed. The remaining changes need to be discussed

@Cicatelli
Copy link
Author

Hi @cpvalente!

The changes presented were a personal need and I made them available since a complete translation of the interfaces could help other people. I understand the big change to implement translation variables for the entire code.

I did not close the translation variables in the entire code, only for the EDITOR view. There is still a lot to do in the other views, however, due to work I have not been able to continue yet...

Regarding the PT vs PT-BR language, there are some terms that sound strange due to cultural differences, and just to avoid changing a language that already exists in the system, I decided to create another one.

I would like to thank you for the excellent work you have been doing with this code, which has helped me a lot!

I hope that within the scope of my knowledge, I can help the growth of a system that has helped me so much. I know little about high-level programming, my area is electrical engineering, the little I know about JS is as a hobby.

@cpvalente
Copy link
Owner

Hi @Cicatelli , thank you for this.

I appreciate your involvement and your help.
If you want to make a separate PR for the the PT-BR translation we can look into it

Meanwhile, if you would like to contribute just reach out and we can find a task that aligns with the roadmap.
A good first start would be to evaluate how you use Ontime in your workflow and where is there friction that we could remove

The easiest way to reach out is likely on discord

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