Skip to content

Conversation

@itsneufox
Copy link
Collaborator

@itsneufox itsneufox commented Dec 20, 2025

Solves #423 after almost 5 years.

Tested locally.

Example generated locally on portuguese index.md:

---
title: Bem-vindo
sidebar_label: Bem-vindo
---

:::warning A tradução pode estar desatualizada
A versão em inglês deste documento foi atualizada recentemente. Esta tradução pode não refletir essas alterações ainda.

Ajude-nos a manter nossas traduções atualizadas! Se você é fluente neste idioma, considere revisar a [versão em inglês](/docs/index) e atualizar esta tradução.
:::


Bem-vindo ao SA-MP wiki, mantido pelo time do open.mp e uma grande comunidade do SA-MP!

Este site tem como objetivo fornecer uma fonte de documentação de fácil acesso e contribuição para SA-MP e, eventualmente, open.mp.

## A Wiki do SA-MP se foi

Infelizmente, o SA-MP Wiki foi desativado em meados de setembro, mas precisamos da ajuda da comunidade para transferir e manter a antiga documentação da velha wiki para sua nova casa, aqui! Felizmente boa parte de toda a documentação já foi transferida.

Se estiver interessado, acesse [esta página](/pt-BR/docs/meta/Contributing) para mais informações e guias.

Se você não tiver experiência com o uso do GitHub ou conversão de HTML, não se preocupe! Você pode ajudar nos informando sobre problemas (via [Discord](https://discord.gg/samp), [Fórum do open.mp](https://forum.open.mp) ou Mídias Sociais) e a parte mais importante: _divulgando tudo_. Então tenha certeza de guardar este site e compartilhar com qualquer pessoa que conheça que está se perguntando para onde o SA-MP Wiki foi.

Aceitamos contribuições para melhorias na documentação, assim como tutoriais e guias para tarefas simples como construir uma gamemode e como usar plugins e bibliotecas. Se você estiver interessado em contribuir então vá para a [página do GitHub](https://github.com/openmultiplayer/web).

The new workflow will check if stale translations exist upon merge and mark all those files as stale with the warning.

needs review and add more translations

@itsneufox itsneufox requested a review from a team as a code owner December 20, 2025 04:15
@itsneufox itsneufox added the type:improvement abc = always be closing (issues) label Dec 20, 2025
@itsneufox
Copy link
Collaborator Author

to add more languages it's in here:

const WARNING_BANNERS = {
  'es': `:::warning La traducción puede estar desactualizada
La versión en inglés de este documento se actualizó recientemente. Es posible que esta traducción aún no refleje esos cambios.

¡Ayuda a mantener nuestras traducciones actualizadas! Si hablas este idioma con fluidez, considera revisar la [versión en inglés](ENGLISH_DOC_LINK) y actualizar esta traducción.
:::

`,
  'pt-BR': `:::warning A tradução pode estar desatualizada
A versão em inglês deste documento foi atualizada recentemente. Esta tradução pode não refletir essas alterações ainda.

Ajude-nos a manter nossas traduções atualizadas! Se você é fluente neste idioma, considere revisar a [versão em inglês](ENGLISH_DOC_LINK) e atualizar esta tradução.
:::

`,
};

@itsneufox itsneufox force-pushed the stale-translation-labeler branch 2 times, most recently from 624e5d5 to b4c7528 Compare December 20, 2025 15:42
@NexiusTailer
Copy link
Contributor

NexiusTailer commented Dec 20, 2025

Russian text for this warning could be the following:

:::warning Этот перевод может быть устаревшим.
Английская версия этой статьи была недавно обновлена. Данный перевод может всё ещё не отражать эти изменения.

Помогите нам поддерживать актуальность переводов! Если вы свободно владеете английским языком, пожалуйста, рассмотрите возможность проверки [английской версии](ENGLISH_DOC_LINK) и обновления этого перевода.
:::

- add script to mark outdated translations
- add workflow for stale translations
- add label checks to deployment

remove deprecated deployment workflows for API and frontend

add deployment workflow for marking translations and deploying frontend/backend

add script to mark outdated translations

add workflow for marking stale translations

consolidate translation marking workflow into deploy process

Stale translation warning

Stale translation warning

Stale translation warning

Stale translation warning

add chars threshold

add translation by Nexius

add translation label check to deployment workflow
@itsneufox itsneufox force-pushed the stale-translation-labeler branch from 9a1289d to 165f7e4 Compare December 20, 2025 21:43
@itsneufox
Copy link
Collaborator Author

ok, current status:

for other languages to be marked as stale, a maintainer must add the label docs:translation-impact to the pr.

when that pr is merged into master, the workflow then:

checks which english docs changed in frontend/docs/
ignores small changes (under 10 characters, using levenshtein distance)
finds the matching translation files
adds a language-specific warning banner at the top of each file (es, pt-br, ru, or a default english one)
commits and pushes those changes back to master

if the label is not added, nothing happens.

@dockfries
Copy link
Contributor

dockfries commented Dec 22, 2025

Maybe it would be better to use a component for warning banner?

@itsneufox
Copy link
Collaborator Author

Maybe it would be better to use a component for warning banner?

oh damn, forgot that existed. Will do it later

@github-actions github-actions bot added the area:translation english english > american english label Dec 23, 2025
@itsneufox
Copy link
Collaborator Author

Maybe it would be better to use a component for warning banner?

@dockfries done

@NexiusTailer
Copy link
Contributor

You forgot to move ru translation

@itsneufox
Copy link
Collaborator Author

You forgot to move ru translation

done, saw it almost immediately, sorry :/

@itsneufox
Copy link
Collaborator Author

Added French (reviewed by Cheaterman)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:translation english english > american english type:improvement abc = always be closing (issues)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants