Skip to content

Commit

Permalink
refactor: Simplify language table generation in update-readme.js
Browse files Browse the repository at this point in the history
  • Loading branch information
ngocjohn committed Nov 2, 2024
1 parent baa66d9 commit 9a623ea
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 5 deletions.
38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,44 @@




### Supported Localization

<details>
<summary>The following languages are supported in this project</summary>

| Language Code | Name | Native Name |
| ------------- | ---------| ----------------|
| `ca` | Catalan | Català |
| `cs` | Czech | Čeština |
| `da` | Danish | Dansk |
| `de` | German | Deutsch |
| `en` | English | English |
| `es` | Spanish | Español |
| `fr` | French | Français |
| `id` | Indonesian | Bahasa Indonesia |
| `it` | Italian | Italiano |
| `nl` | Nederlands | Dutch |
| `pt` | Portuguese | Português (Brasil) |
| `ru` | Русский | Русский |
| `sk` | Slovak | Slovenčina |

</details>

## Features

- **Current Lunar Phase Display:** Shows the current phase of the moon.
- **Detailed Lunar Information:** Provides additional details about the lunar cycle.
- **Customizable:** Easily customizable to fit your dashboard's theme.
- **Responsive Design:** Works well on both desktop and mobile devices.
- **Custom Latitude and Longitude Configuration:** Offers the possibility to configure custom latitude and longitude for precise lunar data.
- **Specific Date Lunar Information:** Option to display the moon information for a specific date.
- **Multilingual Support**: The card includes various translations, making it accessible in multiple languages.





### Supported Localization

<details>
Expand Down
8 changes: 3 additions & 5 deletions scripts/update-readme.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,16 @@ const updateReadme = () => {
});

// Create the new language table
const newTableRows = languages
.map((lang) => `| \`${lang.code}\` | ${lang.name} | ${lang.nativeName} |`)
.join('\n');
const newTableRows = languages.map((lang) => `| \`${lang.code}\` | ${lang.name} | ${lang.nativeName} |`).join('\n');

const newLocalizationSection = `
### Supported Localization
<details>
<summary>The following languages are supported in this project</summary>
| Language Code | Name | Native Name |
| ------------- | ---------------------- | ---------------------- |
| Language Code | Name | Native Name |
| ------------- | ---------| ----------------|
${newTableRows}
</details>`;
Expand Down

0 comments on commit 9a623ea

Please sign in to comment.