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

Code Review & Rename Fields According to Naming Convention Standard #8175

Open
ChernenkoVitaliy opened this issue Feb 25, 2025 · 0 comments
Open
Assignees
Labels
back-end This is label if this task is back-end Bug

Comments

@ChernenkoVitaliy
Copy link
Contributor

Description

Summary:

We need to review the current codebase and ensure that the field names are following the established naming conventions for multi-language translation fields in Java classes. Specifically, we want to adhere to the following naming conventions:

  • Fields representing Ukrainian data should be suffixed with Uk (e.g., titleUk, descriptionUk).
  • Fields representing English data should be suffixed with En (e.g., titleEn, descriptionEn).
  • We should avoid using non-standard language codes (e.g., titleUa).
  • All field names should be in camelCase format.
  • All changes should be synced with the UI team to avoid breaking the code and ensure seamless integration between the frontend and backend.

Tasks:

  • Review the existing Java classes that contain translation fields (e.g., HabitTranslationDto) and ensure the fields are named according to the above conventions.
  • Rename any incorrectly named fields:
    • For Ukrainian fields, rename suffixes like Ua to Uk.
  • Ensure that the fields are consistent with standatds (Uk for Ukrainian, En for English).

Example of Correct Naming:

public class HabitTranslationDto {
    private String description;
    private String habitItem;
    private String languageCode;
    private String name;
    private String descriptionUk;  // Ukrainian description
    private String nameUk;         // Ukrainian name
    private String habitItemUk;    // Ukrainian habit item
}
@ChernenkoVitaliy ChernenkoVitaliy added back-end This is label if this task is back-end Bug labels Feb 25, 2025
@ChernenkoVitaliy ChernenkoVitaliy moved this to Bugs in GreenCity Feb 25, 2025
@oleksandra-bulhakova oleksandra-bulhakova self-assigned this Feb 25, 2025
@oleksandra-bulhakova oleksandra-bulhakova moved this from Bugs to Bugs in progress in GreenCity Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
back-end This is label if this task is back-end Bug
Projects
Status: Bugs in progress
Development

No branches or pull requests

2 participants