admirhusic / GoodFirstIssueFinder

A simple app which helps you find a good first issue
https://good-first-issue-finder.vercel.app
0 stars 4 forks source link

Centralized Strings File for the app #14

Closed admirhusic closed 2 weeks ago

admirhusic commented 2 weeks ago

Description:

We need to create a centralized file in our app to store all the strings used throughout the application. This will help in managing and accessing the strings easily, especially for tasks like internationalization, updates, and maintenance, which will be added down the road.

Task Details:

Create a new file:

File name: strings.ts Define a strings object:

The file should export a constant object named strings. The keys of this object will be the identifiers for the strings. The values will be the actual string content. Example Structure:

typescript

// strings.ts
// simple example
export const strings = {
    welcomeMessage: "Welcome to our app!",
    loginButton: "Log In",
    logoutButton: "Log Out",
    signupButton: "Sign Up",
    // Add other strings as needed
};

Benefits:

Centralizes the string management. Simplifies future updates and maintenance. Facilitates localization and internationalization. Acceptance Criteria:

The file strings.ts should be created in the src directory. All strings currently hardcoded in the app should be moved to the strings.ts file. All references to the moved strings in the app should be updated to use the strings object.

Additional Notes:

Ensure that the keys are meaningful and descriptive to make the object easy to use and understand. Follow existing project conventions for naming and structure.

kofta999 commented 2 weeks ago

Looks interesting, may I work on this?

Also as far as I'm concerned, there exists some libraries for internationalization, so would having a strings.ts file be good option for using these libraries later in the project? Or we would have to redo it again in the library's way?

admirhusic commented 2 weeks ago

@kofta999 Sure! Enjoy and good luck!

admirhusic commented 2 weeks ago

@kofta999 And regarding the internationalization, I would suggest to tackle this later, since we currently do not have many strings to translate. For this we will create a new issue.