Skip to content

Conversation

@DiegoPino
Copy link
Contributor

@DiegoPino DiegoPino commented May 12, 2025

See #107

We have this in production for a few years already. Would be great if it could become part of the main package. Thanks a lot

Summary by CodeRabbit

  • New Features
    • Added Spanish language support, enabling date and time information to be displayed in Spanish throughout the application.

@coderabbitai
Copy link

coderabbitai bot commented May 12, 2025

📝 Walkthrough

Walkthrough

A new Spanish localization JSON file has been added to the EDTF PHP library. It provides comprehensive Spanish translations for date and time-related terms, qualifiers, and complex date expressions, including metadata and dynamic placeholders for flexible formatting.

Changes

File(s) Change Summary
i18n/es.json Added Spanish localization JSON file containing translations for date/time terms, qualifiers, intervals, and complex expressions, with metadata and placeholders.

Tip

⚡️ Faster reviews with caching
  • CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure Review - Disable Cache at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the Data Retention setting under your Organization Settings.

Enjoy the performance boost—your workflow just got faster.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 97c5d87 and 1f0cd80.

📒 Files selected for processing (1)
  • i18n/es.json (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • i18n/es.json

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

❤️ Share
🪧 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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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 generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this 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

@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: 0

🧹 Nitpick comments (2)
i18n/es.json (2)

7-7: Consider Using “Biblioteca PHP” Instead of “Librería PHP”

In Spanish, “biblioteca” is commonly used for software libraries, whereas “librería” can be confused with “bookstore.” You may want to update the description accordingly.


18-29: Align Season Names’ Casing with Month Names

Month names are in lowercase, whereas season names start with an uppercase letter. For consistency, consider lowercasing the season names. For example:

-"edtf-spring": "Primavera",
+"edtf-spring": "primavera",

Repeat similarly for the other season keys.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5bba53b and 97c5d87.

📒 Files selected for processing (1)
  • i18n/es.json (1 hunks)
🔇 Additional comments (12)
i18n/es.json (12)

2-6: Metadata Block Looks Good

The metadata includes the author’s information correctly and adheres to the expected structure for localization files.


8-10: Qualifier Translations Are Correct

The translations for “maybe circa,” “circa,” and “maybe” are accurate and the placeholders are used consistently.


11-13: Verify Gender Agreement in Adjective Forms

The adjectives “incierta” and “aproximada” assume a feminine subject. If $1 can refer to masculine terms (e.g., “mes,” “año”), the gender will mismatch. Consider confirming the usage context or providing masculine variants to ensure grammatical correctness.


14-17: Date Part Labels Are Consistent

The labels for “and prefix,” “day,” “month,” and “year” are accurate and align with the expected EDTF terminology.


30-38: Quarter, Quadrimester, and Semester Translations Are Accurate

The translations for quarters, quadrimesters, and semesters correctly reflect the intended meaning and use proper numbering and terminology.


39-44: Full Date and Year Formats Look Good

The date formatting strings and BC year representations correctly use the placeholders in the proper order and include appropriate abbreviations.


45-56: Month Name Translations Are Correct

All twelve month names are accurately translated into Spanish with correct spelling and lowercase formatting.


57-61: Interval Expressions Are Well Translated

The interval keys cover normal, open-ended, and unknown-bound intervals with clear Spanish phrasing.


62-69: Miscellaneous Date Terms Are Accurate

Translations for local time, empty set, “all of these,” “one of these,” and year-based range qualifiers are correct and idiomatic.


70-77: Month/Day Range and Comparison Expressions Are Correct

All expressions for “and all earlier/later” and “or earlier/later” pertaining to months and days are properly phrased.


78-81: Season Range Expressions Look Good

The qualifiers for seasons (“or earlier/later” and “and all earlier/later”) correctly follow the established pattern.


82-92: Set and One-of-These Constructs Are Properly Rendered

The inline set and range constructs for dates and years are accurately translated, including proper use of colons and placeholders.

@JeroenDeDauw
Copy link
Member

Thanks!

@JeroenDeDauw JeroenDeDauw merged commit 174fd98 into ProfessionalWiki:master May 12, 2025
7 of 8 checks passed
@DiegoPino
Copy link
Contributor Author

Gracias @JeroenDeDauw, really appreciate it!

@JeroenDeDauw
Copy link
Member

Released as 3.0.2

@kghbln
Copy link
Member

kghbln commented May 12, 2025

This should have done via translatewiki.net. I suspect once someone starts translating the automatic translation update here could remove all other message keys.

@JeroenDeDauw
Copy link
Member

AFAIK when @translatewiki syncs next time, they will pick up on the new translations, so unless someone touches stuff there beforehand, everything should be fine, and even if they do touch it beforehand, it might still be merged in.

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.

3 participants