Skip to content

Commit

Permalink
Revert "adding the .mo and .pot files to git ignore"
Browse files Browse the repository at this point in the history
This reverts commit c8ac0a1.
  • Loading branch information
analaura09 committed Oct 7, 2021
1 parent c0df899 commit eb3108c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 29 deletions.
9 changes: 0 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,3 @@
/freegames.egg-info/

.DS_Store


.vscode/

#unnecessary files
*.mo
*.pot


26 changes: 6 additions & 20 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@ SPHINXPROJ = FreeGames
SOURCEDIR = .
BUILDDIR = _build

LOCALES = $(patsubst locale/%,%,$(wildcard locale/*))

MV = mv
RM = rm -r

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
Expand All @@ -23,28 +18,19 @@ help:
update-po: gettext
$(SPHINXINTL) update -p "$(BUILDDIR)/gettext" $(0)

pot: gettext
@cp $(BUILDDIR)/gettext/*.pot locale/

%-translated: LOCALES = $(patsubst locale/%,%,$(wildcard locale/*))
%-translated:
@for locale in $(LOCALES); do \
SPHINXOPTS="-D language=$$locale"; \
BUILDDIR="$(BUILDDIR)/$$locale"; \
$(SPHINXBUILD) -M "$(TARGET)" "$(SOURCEDIR)" "$$BUILDDIR" $$SPHINXOPTS; \
TARGET="$(patsubst %-translated,%,$@)"; \
$(SPHINXBUILD) -M "$$TARGET" "$(SOURCEDIR)" "$$BUILDDIR" $$SPHINXOPTS; \
done

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

TARGET=$@ make translated

@for locale in $(LOCALES); do \
LOCALEDIR="$(BUILDDIR)/$$locale"; \
TARGETDIR="$(BUILDDIR)/$@/$$locale"; \
$(MV) "$$LOCALEDIR/$@" "$$TARGETDIR"; \
$(RM) "$$LOCALEDIR"; \
echo "HTML pages was moved to $$TARGETDIR directory"; \
done


clean:
$(RM) $(BUILDDIR)

0 comments on commit eb3108c

Please sign in to comment.