Skip to content

Commit 3672c4b

Browse files
author
Alexander Rogalskiy
committed
Updates on files
1 parent 3b8c3f3 commit 3672c4b

4 files changed

Lines changed: 34 additions & 1 deletion

File tree

Makefile

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ else
3636
AT := @
3737
endif
3838

39+
# Optional flag to run target in a docker container.
40+
# (example `make test USE_DOCKER=true`)
41+
ifeq ($(USE_DOCKER),true)
42+
DOCKER_CMD := docker compose run
43+
endif
44+
3945
IMAGE ?= styled-java-patterns
4046
OKTETO_IMAGE ?= okteto/$(IMAGE)
4147
DOCKER_IMAGE ?= alexanderr/$(IMAGE)
@@ -82,12 +88,23 @@ _venv:
8288
@echo -e "$(cred)Virtual env created. The source pages are in $(VENV_NAME) directory.$(cend)"
8389
@echo
8490

91+
# This rule creates a file named .env that is used by docker-compose for passing
92+
# the USER_ID and GROUP_ID arguments to the Docker image.
93+
.env: ## Setup step for using using docker-compose with make target.
94+
@touch .env
95+
ifneq ($(OS),Windows_NT)
96+
ifneq ($(shell uname -s), Darwin)
97+
@echo USER_ID=$(shell id -u) >> .env
98+
@echo GROUP_ID=$(shell id -g) >> .env
99+
endif
100+
endif
101+
85102
# Create help information.
86103
.PHONY: help
87104
help:
88105
@echo
89106
@echo
90-
@echo -e "$(cred)Please use [make <target>] where <target> is one of:$(cend)"
107+
@echo -e "$(cred)Please use <make [target] [USE_DOCKER=true]> where [target] is one of:$(cend)"
91108
@echo " all to run linting & format tasks"
92109
@echo " clean to remove temporary directories"
93110
@echo " deps to install dependencies"
@@ -113,6 +130,7 @@ help:
113130
@echo " venv-run to run documentation in virtual environment"
114131
@echo " versions to list commands versions"
115132
@echo
133+
@echo 'use USE_DOCKER=true to run target in a docker container'
116134
@echo
117135

118136
# Lists all targets defined in this makefile.

crowdin.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
commit_message: "docs(i18n): New translations %original_file_name% (%language%)"
2+
append_commit_message: false
3+
files:
4+
- source: /docs/**/*.md
5+
translation: /docs/**/%file_name%.%two_letters_code%.%file_extension%
6+
ignore:
7+
- /docs/**/%file_name%.%two_letters_code%.%file_extension%

docs/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ python-markdown-math>=0.6
1111
mkdocs-material-extensions>=1.0
1212
mkdocs-git-revision-date-localized-plugin>=0.9.2
1313
mkdocs-awesome-pages-plugin>=2.5.0
14+
mkdocs-static-i18n>=0.14
1415
mdx-truly-sane-lists>=1.2
1516
mkdocs-include-markdown-plugin>=3.2.1
1617
mkdocs-redirects>=1.0.3

mkdocs.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ theme:
3434
- navigation.tracking
3535
- navigation.sections
3636
- navigation.expand
37+
- navigation.instant
3738
- navigation.indexes
3839
- search.suggest
3940
- search.highlight
@@ -62,6 +63,12 @@ theme:
6263
# Plugins
6364
plugins:
6465
- search
66+
- i18n:
67+
default_language: en
68+
languages:
69+
en: English
70+
uk: Українська
71+
zh: 简体中文
6572
- git-revision-date-localized: # https://squidfunk.github.io/mkdocs-material/plugins/revision-date/
6673
fallback_to_build_date: true
6774
type: date

0 commit comments

Comments
 (0)