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

General: Fix an issue where a translation is outdated #9804

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

edkaya
Copy link
Contributor

@edkaya edkaya commented Nov 17, 2024

Checklist

General

Client

  • I added multiple screenshots/screencasts of my UI changes.

Motivation and Context

We updated some translations in exam mode in #9569, but one translation in exam timeline remained outdated.

Description

I updated the outdated translation.

Steps for Testing

Prerequisites:

  • 1 submitted exam with a Programming Exercise
  • 1 Instructor or admin account

(There is already an exam with a submitted programming exercise called "programming diff 2" on TS3 under my course.)

  1. Log in to Artemis
  2. Navigate to Course Administration of my course "Ege Dogu Kaya"
  3. Navigate to Exams
  4. Click on programming diff 2
  5. Go to Student Exams
  6. Click View for Test User 1 Artemis
  7. Click Exam Timeline
  8. Verify that translation is correct in the heading with points: You should see "dif programing test2 [1 Points]" and "dif programing test2 [1 Punkte]"

Testserver States

Note

These badges show the state of the test servers.
Green = Currently available, Red = Currently locked
Click on the badges to get to the test servers.







Review Progress

Code Review

  • Code Review 1
  • Code Review 2

Manual Tests

  • Test 1
  • Test 2

Screenshots

Before
Screenshot 2024-11-16 at 17 57 17

After
Screenshot 2024-11-16 at 17 57 40

Summary by CodeRabbit

  • New Features

    • Updated translation key for displaying maximum points in the programming exercise exam diff view.
  • Bug Fixes

    • Ensured that existing functionality for displaying scores and commit information remains intact.

@github-actions github-actions bot added the client Pull requests that update TypeScript code. (Added Automatically!) label Nov 17, 2024
@edkaya edkaya temporarily deployed to artemis-test3.artemis.cit.tum.de November 18, 2024 00:20 — with GitHub Actions Inactive
@edkaya edkaya marked this pull request as ready for review November 18, 2024 00:32
@edkaya edkaya requested a review from a team as a code owner November 18, 2024 00:32
Copy link

coderabbitai bot commented Nov 18, 2024

Walkthrough

The changes in this pull request involve an update to the HTML template of the programming-exercise-exam-diff.component.html file. Specifically, the translation key for displaying the maximum points of exercises has been modified from artemisApp.examParticipation.points to artemisApp.examParticipation.exercisePoints. The overall structure of the HTML remains largely unchanged, preserving existing conditional rendering and functionality related to displaying Git diff reports and statistics.

Changes

File Change Summary
src/main/webapp/app/exam/manage/student-exams/student-exam-timeline/programming-exam-diff/programming-exercise-exam-diff.component.html Updated translation key from artemisApp.examParticipation.points to artemisApp.examParticipation.exercisePoints for displaying maximum points. Structure and logic remain unchanged.

Possibly related PRs

Suggested labels

documentation, small, bugfix, ready to merge

Suggested reviewers

  • JohannesWt
  • SimonEntholzer
  • pzdr7
  • coolchock
  • Hialus

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 or @coderabbitai title anywhere in the PR title to generate the title automatically.

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.yaml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 1786886 and e65d45c.

📒 Files selected for processing (1)
  • src/main/webapp/app/exam/manage/student-exams/student-exam-timeline/programming-exam-diff/programming-exercise-exam-diff.component.html (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
src/main/webapp/app/exam/manage/student-exams/student-exam-timeline/programming-exam-diff/programming-exercise-exam-diff.component.html (1)

Pattern src/main/webapp/**/*.html: @if and @for are new and valid Angular syntax replacing *ngIf and *ngFor. They should always be used over the old style.

🔇 Additional comments (1)
src/main/webapp/app/exam/manage/student-exams/student-exam-timeline/programming-exam-diff/programming-exercise-exam-diff.component.html (1)

5-7: LGTM! Proper usage of new Angular syntax.

The template correctly uses the new @if syntax instead of *ngIf throughout the file, adhering to the coding guidelines.

Also applies to: 18-40

>[{{ exercise.maxPoints }} {{ 'artemisApp.examParticipation.points' | artemisTranslate }}]
>[{{ exercise.maxPoints }} {{ 'artemisApp.examParticipation.exercisePoints' | artemisTranslate }}]
Copy link
Contributor

Choose a reason for hiding this comment

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

We want to get away from using the artemisTranslate pipe, and instead use the jhiTranslate. You can also pass in values to the String with translateValues. If that's possible here, it would be nice

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes exactly, but using jhiTranslate here forces me to change the translation value of exercisePoints, because it uses brackets around the points, where I need to integrate those brackets into the translation value. But this translation key is also used in different parts of Artemis, and they don't use brackets, so I need to introduce a new translation only for this one. Therefore, keeping artemisTranslate here will be a better option in my opinion 😄

Copy link

⚠️ Unable to deploy to test servers ⚠️

Testserver "artemis-test3.artemis.cit.tum.de" is already in use by PR #9814.

@github-actions github-actions bot added the deployment-error Added by deployment workflows if an error occured label Nov 18, 2024
@edkaya edkaya removed the deployment-error Added by deployment workflows if an error occured label Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix client Pull requests that update TypeScript code. (Added Automatically!) ready for review small
Projects
Status: Ready For Review
Development

Successfully merging this pull request may close these issues.

5 participants