Skip to content

Commit

Permalink
tools/mmgotool: move into monorepo (mattermost#24010)
Browse files Browse the repository at this point in the history
  • Loading branch information
isacikgoz committed Jul 17, 2023
1 parent 8ee38ee commit 38fd8cd
Show file tree
Hide file tree
Showing 7 changed files with 815 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -332,11 +332,11 @@ app-layers: ## Extract interface from App struct
$(GO) run ./channels/app/layer_generators -in ./channels/app/app_iface.go -out ./channels/app/opentracing/opentracing_layer.go -template ./channels/app/layer_generators/opentracing_layer.go.tmpl

i18n-extract: ## Extract strings for translation from the source code
$(GO) install github.com/mattermost/mattermost-utilities/mmgotool@mono-repo
cd ../tools/mmgotool && $(GO) install .
$(GOBIN)/mmgotool i18n extract --portal-dir=""

i18n-check: ## Exit on empty translation strings and translation source strings
$(GO) install github.com/mattermost/mattermost-utilities/mmgotool@mono-repo
cd ../tools/mmgotool && $(GO) install .
$(GOBIN)/mmgotool i18n clean-empty --portal-dir="" --check
$(GOBIN)/mmgotool i18n check-empty-src --portal-dir=""

Expand Down
22 changes: 22 additions & 0 deletions tools/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Tools

This directory aims to provide a set of tools that simplify and enhance various development tasks. This README file serves as a guide to help you understand the directory, features of these tools, and how to get started using it. This is a collection of utilities and scripts designed to streamline common development tasks for Mattermost. These tools aim to help automate repetitive tasks and improve productivity.

## Included tools

* **mmgotool**: is a CLI to help with i18n related checks for the mattermost/server development.

## Installation & Usage

### mmgotool

To install `mmgotool`, simply run the following command: `go install github.com/mattermost/mattermost/tools/mmgotool`

Make sure you have the necessary prerequisites such as [Go](https://go.dev/) compiler.

`mmgotool i18n` has following subcommands described below:

* `check`: Check translations
* `check-empty-src`: Check for empty translation source strings
* `clean-empty`: Clean empty translations
* `extract`: Extract translations
Loading

0 comments on commit 38fd8cd

Please sign in to comment.