fix(punctuation): Add period instead of semicolon for Greek lang (@sledgehammer999) (#6299)

### Description

This is a followup to PR #6297.
1. `:` is a valid punctuation mark and isn't decided in another if/else
branch, so I left it as-is.
2. `;` is also a valid punctuation mark but it is used as a question
mark in the appropriate if/else branch. So here I convert it to a
period.

Modern greeks use either a period or a comma in place of a middle
dot/ano teleia. I would say that a period fits better most of the time.

### Checks

- [ ] Adding quotes?
- [ ] Make sure to include translations for the quotes in the
description (or another comment) so we can verify their content.
- [ ] Adding a language or a theme?
- [ ] If is a language, did you edit `_list.json`, `_groups.json` and
add `languages.json`?
  - [ ] If is a theme, did you add the theme.css?
- Also please add a screenshot of the theme, it would be extra awesome
if you do so!
- [ ] Check if any open issues are related to this PR; if so, be sure to
tag them below.
- [ ] Make sure the PR title follows the Conventional Commits standard.
(https://www.conventionalcommits.org for more info)
- [ ] Make sure to include your GitHub username prefixed with @ inside
parentheses at the end of the PR title.

<!-- label(optional scope): pull request title (@your_github_username)
-->

<!-- I know I know they seem boring but please do them, they help us and
you will find out it also helps you.-->

Closes #

<!-- the issue(s) your PR resolves if any (delete if that is not the
case) -->
<!-- please also reference any issues and or PRs related to your pull
request -->
<!-- Also remove it if you are not following any issues. -->

<!-- pro tip: you can mention an issue, PR, or discussion on GitHub by
referencing its hash number e.g:
[#1234](https://github.com/monkeytypegame/monkeytype/pull/1234) -->

<!-- pro tip: you can press . (dot or period) in the code tab of any
GitHub repo to get access to GitHub's VS Code web editor Enjoy! :) -->
This commit is contained in:
sledgehammer999 2025-02-22 13:10:33 +02:00 committed by GitHub
parent 1bb15af190
commit 73182d450f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -204,6 +204,11 @@ export async function punctuateWord(
) {
if (currentLanguage === "french") {
word = ";";
} else if (currentLanguage === "greek") {
// Normally U+00B7 ('middle dot' or 'ano teleia') would be used here.
// However, a) it has fallen into disuse in contemporary times and
// b) there isn't a dedicated key on a keyboard to input it
word = ".";
} else if (currentLanguage === "arabic" || currentLanguage === "kurdish") {
word += "؛";
} else if (currentLanguage === "chinese") {