Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Paurikova2
Copy link
Collaborator

@Paurikova2 Paurikova2 commented Apr 30, 2025

Phases MP MM MB MR JM Total
ETA 0 0 0 0 0 0
Developing 1.5 0 0 0 0 0
Review 0 0 0 0 0 0
Total - - - - - 0
ETA est. 0
ETA cust. - - - - - 0

Problem description

The distribution license is not translated when the language is switched to Czech.

Reported issues

The issue was solved based on this PR: DSpace#8966
with this translation: https://github.com/ufal/clarin-dspace/blob/clarin/dspace/config/licenses/alternative_cs.license

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features

    • Added support for the Czech locale.
    • Introduced a Czech-language non-exclusive distribution license.
  • Chores

    • Updated configuration to include Czech as a supported language.

@coderabbitai
Copy link

coderabbitai bot commented Apr 30, 2025

Walkthrough

A configuration file was updated to add support for the Czech locale by specifying it in the list of supported locales. Additionally, a new license file in Czech was introduced, providing a non-exclusive distribution license text for Charles University. A test was updated to expect the Content-Language header to include both English and Czech languages for anonymous API requests. No changes were made to public or exported entities, and no other configuration settings were altered.

Changes

File(s) Change Summary
dspace-api/src/test/data/dspaceFolder/config/local.cfg Added support for the Czech locale (cs) in the webui.supported.locales property.
dspace/config/default_cs.license Added a new Czech-language non-exclusive distribution license file for Charles University.
dspace-server-webapp/src/test/java/org/dspace/app/rest/LanguageSupportIT.java Updated test to expect Content-Language header to include "en,cs" instead of just "en".

Poem

In the land of code, a Czech breeze blew,
With locale support, the language grew.
A license in Czech, for scholars to share,
Ensuring their rights are handled with care.
Now rabbits can hop from Prague to the sea,
In a world of config, as free as can be!
🐇🌍


📜 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 2dde1d7 and 10a7bec.

📒 Files selected for processing (1)
  • dspace-api/src/test/data/dspaceFolder/config/local.cfg (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • dspace-api/src/test/data/dspaceFolder/config/local.cfg
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: Run Integration Tests
  • GitHub Check: dspace-dependencies / docker-build (linux/amd64, ubuntu-latest, true)
  • GitHub Check: Run Unit Tests

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: 1

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 8eedba2 and 1e8f3ac.

📒 Files selected for processing (2)
  • dspace-api/src/test/data/dspaceFolder/config/local.cfg (1 hunks)
  • dspace/config/default_cs.license (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: dspace-dependencies / docker-build (linux/amd64, ubuntu-latest, true)
  • GitHub Check: Run Integration Tests
  • GitHub Check: Run Unit Tests
🔇 Additional comments (2)
dspace/config/default_cs.license (1)

1-31: Add Czech distribution license text
The new default_cs.license file correctly mirrors the pattern of other locale‐specific license files by providing a full Czech translation of the non‐exclusive distribution license. It fulfills the PR’s objective of localizing the license for Czech users.
Please ensure the file is saved with UTF-8 encoding and ends with a newline to maintain consistency across platforms.

dspace-api/src/test/data/dspaceFolder/config/local.cfg (1)

326-326: Unrelated property change: allow.edit.metadata
The allow.edit.metadata = line was uncommented and left blank. This override is unrelated to Czech locale support and may unintentionally impact metadata editing behavior in your tests.
Please confirm whether this change is intentional; if not, revert this line to avoid side effects.

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 (1)
dspace-server-webapp/src/test/java/org/dspace/app/rest/LanguageSupportIT.java (1)

42-42: Consider standardizing comma formatting across tests.

Note that this test uses "en,cs" (without a space after comma) while other tests in this class use "uk, it" (with a space after comma) on lines 75, 78, and 81. Consider standardizing the formatting for consistency.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 1e8f3ac and 2dde1d7.

📒 Files selected for processing (1)
  • dspace-server-webapp/src/test/java/org/dspace/app/rest/LanguageSupportIT.java (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: dspace-dependencies / docker-build (linux/amd64, ubuntu-latest, true)
  • GitHub Check: Run Integration Tests
  • GitHub Check: Run Unit Tests
🔇 Additional comments (1)
dspace-server-webapp/src/test/java/org/dspace/app/rest/LanguageSupportIT.java (1)

42-42: Test expectation updated to include Czech language support.

The test now correctly expects the Content-Language header to include both English and Czech ("en,cs") which aligns with the PR's objective of adding Czech locale support for the distribution license.

@Paurikova2 Paurikova2 requested a review from milanmajchrak May 7, 2025 08:43
@milanmajchrak milanmajchrak requested a review from vidiecan May 7, 2025 09:57
@vidiecan vidiecan requested a review from Copilot May 12, 2025 14:36
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request adds Czech language support by including a new Czech license file, updating tests to expect the Czech locale, and modifying configuration to support Czech for the distribution license.

  • Added a Czech license file in dspace/config/default_cs.license
  • Updated tests in LanguageSupportIT.java to include Czech in the Content-Language header
  • Updated local.cfg to support the Czech locale

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
dspace/config/default_cs.license Added the Czech license translation
dspace-server-webapp/src/test/java/org/dspace/app/rest/LanguageSupportIT.java Modified test to check for "en,cs" in the Content-Language header
dspace-api/src/test/data/dspaceFolder/config/local.cfg Added configuration for Czech locale support

@milanmajchrak milanmajchrak merged commit d2efd3e into dtq-dev May 13, 2025
11 checks passed
milanmajchrak added a commit that referenced this pull request May 16, 2025
* Fixed browse - the results are not lowercase (#954)

* S3-CESNET direct downloads (#949)

* Return headers for HEAD request - the bitstream download endpoint (#956)

* The bitstream name is encoded in the URL. (#958)

* SWORDv2 issues: Cannot update bitstream of archived Item. The swordv2 url is not composed correctly. Fixed deleting the workspace item when used org.dspace.sword2.WorkflowManagerDefault (#957)

* The file preview process not required username and password in UI (#960)

* Added translation of distribution license for collection to Czech (#952)

* Added dead and deadSince to handle rest (#948)

* Display community and collection handle (#961)

* Embargo during submission not recorded in provenance (#950)

* Allow to access File Downloader for any authorized user (ufal#1199)

* allow.edit.metadata property should also work for submitters that are members of collection SUBMIT subgroup (ufal#1202)

* Prevent error 500 for non admin user uploading file to bundle (ufal#1205)

* Track downloads as pageviews (ufal#1209)

* Loading the bitstreams - performance issue (ufal#1211)
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.

UFAL/Distribution license for the collection is not translated

4 participants