Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP/RFC: add locale folder for helpdb.jl #2499

Closed
wants to merge 13 commits into from
Closed
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions LOCALE
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Uncomment to enable
# Comment to disable
# A for Available, U for Unavailable

# "bn" # Bengali U
# "ca" # Catalan U
# "cs" # Czech U
# "da" # Danish U
# "de" # German U
"en" # English A
# "es" # Spanish U
# "et" # Estonian U
# "fa" # Iranian U
# "fi" # Finnish U
# "fr" # French U
# "hr" # Croatian U
# "it" # Italian U
# "ja" # Japanese U
# "ko" # Korean U
# "lt" # Lithuanian U
# "lv" # Latvian U
# "ne" # Nepali U
# "nl" # Dutch U
# "pl" # Polish U
# "pt_BR" # Brazilian Portuguese U
# "ru" # Russian U
# "sl" # Slovenian U
# "sv" # Swedish U
# "tr" # Turkish U
# "uk_UA" # Ukrainian U
# "zh_CN" # Simplified Chinese A
# "zh_TW" # Traditional Chinese U
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Newline, please.

9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ default: release
DIRS = $(BUILD)/bin $(BUILD)/lib $(BUILD)/$(JL_PRIVATE_LIBDIR) $(BUILD)/share/julia

$(foreach dir,$(DIRS),$(eval $(call dir_target,$(dir))))
$(foreach link,extras base test doc examples ui,$(eval $(call symlink_target,$(link),$(BUILD)/share/julia)))
$(foreach link,extras base test doc examples ui help,$(eval $(call symlink_target,$(link),$(BUILD)/share/julia)))

QUIET_MAKE =
ifeq ($(USE_QUIET), 1)
QUIET_MAKE = -s
endif

debug release: | $(DIRS) $(BUILD)/share/julia/extras $(BUILD)/share/julia/base $(BUILD)/share/julia/test $(BUILD)/share/julia/doc $(BUILD)/share/julia/examples $(BUILD)/share/julia/ui
debug release: | $(DIRS) $(BUILD)/share/julia/extras $(BUILD)/share/julia/base $(BUILD)/share/julia/test $(BUILD)/share/julia/doc $(BUILD)/share/julia/examples $(BUILD)/share/julia/ui $(BUILD)/share/julia/help
@$(MAKE) $(QUIET_MAKE) julia-$@
@export JL_PRIVATE_LIBDIR=$(JL_PRIVATE_LIBDIR) && \
$(MAKE) $(QUIET_MAKE) LD_LIBRARY_PATH=$(BUILD)/lib:$(LD_LIBRARY_PATH) JULIA_EXECUTABLE="$(JULIA_EXECUTABLE_$@)" $(BUILD)/$(JL_PRIVATE_LIBDIR)/sys.ji
Expand All @@ -29,11 +29,11 @@ julia-debug julia-release:
@$(MAKE) $(QUIET_MAKE) -C ui $@
@ln -sf $(BUILD)/bin/$@-$(DEFAULT_REPL) julia

$(BUILD)/share/julia/helpdb.jl: doc/helpdb.jl | $(BUILD)/share/julia
$(BUILD)/share/julia/help/helpdb_en.jl: doc/helpdb_en.jl | $(BUILD)/share/julia/help/
@cp $< $@

# use sys.ji if it exists, otherwise run two stages
$(BUILD)/$(JL_PRIVATE_LIBDIR)/sys.ji: VERSION base/*.jl base/pkg/*.jl $(BUILD)/share/julia/helpdb.jl
$(BUILD)/$(JL_PRIVATE_LIBDIR)/sys.ji: VERSION base/*.jl base/pkg/*.jl $(BUILD)/share/julia/help/helpdb_en.jl
@#echo `git rev-parse --short HEAD`-$(OS)-$(ARCH) \(`date +"%Y-%m-%d %H:%M:%S"`\) > COMMIT
$(QUIET_JULIA) cd base && \
(test -f $(BUILD)/$(JL_PRIVATE_LIBDIR)/sys.ji || $(JULIA_EXECUTABLE) -bf sysimg.jl) && $(JULIA_EXECUTABLE) -f sysimg.jl || echo "Note: this error is usually fixed by running 'make clean'. If the error persists, 'make cleanall' may help."
Expand Down Expand Up @@ -81,6 +81,7 @@ ifeq ($(OS), WINNT)
-cp $(JULIAHOME)/contrib/windows/* $(PREFIX)
endif
cp $(JULIAHOME)/VERSION $(PREFIX)/share/julia/VERSION
cp $(JULIAHOME)/LOCALE $(PREFIX)/share/julia/LOCALE
echo `git rev-parse --short HEAD`-$(OS)-$(ARCH) \(`date +"%Y-%m-%d %H:%M:%S"`\) > $(PREFIX)/share/julia/COMMIT

dist:
Expand Down
3 changes: 2 additions & 1 deletion base/util.jl
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,8 @@ function init_help()
help_module_dict, help_function_dict
if help_category_dict == nothing
println("Loading help data...")
helpdb = evalfile("$JULIA_HOME/../share/julia/helpdb.jl")
HELP_LOCALE = evalfile("$JULIA_HOME/../share/julia/LOCALE")
helpdb = evalfile("$JULIA_HOME/../share/julia/help/helpdb_$(HELP_LOCALE).jl")
help_category_list = {}
help_category_dict = Dict()
help_module_dict = Dict()
Expand Down
6 changes: 3 additions & 3 deletions doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ WGET = $(abspath ../deps)/jldownload

help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " helpdb.jl to make the REPL help db"
@echo " helpdb_en.jl to make the REPL help db"
@echo " html to make standalone HTML files"
@echo " dirhtml to make HTML files named index.html in directories"
@echo " singlehtml to make a single large HTML file"
Expand Down Expand Up @@ -171,9 +171,9 @@ doctest:
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."

helpdb.jl: stdlib/*.rst sphinx/jlhelp.py sphinx/julia.py
helpdb_en.jl: stdlib/*.rst sphinx/jlhelp.py sphinx/julia.py
$(SPHINXBUILD) -b jlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/jlhelp
mv $(BUILDDIR)/jlhelp/jlhelp.jl helpdb.jl
mv $(BUILDDIR)/jlhelp/jlhelp.jl helpdb_en.jl

listpkg:
$(JULIA) listpkg.jl
6 changes: 3 additions & 3 deletions doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ On ubuntu, you'll need the following packages installed:

Then run

$ make helpdb.jl
$ make helpdb_en.jl
$ make html
$ make latexpdf

Expand All @@ -27,9 +27,9 @@ File layout
-----------

conf.py Sphinx configuration
helpdb.jl REPL help database
helpdb_en.jl REPL help database
sphinx/ Sphinx extensions and plugins
sphinx/jlhelp.py Sphinx plugin to build helpdb.jl
sphinx/jlhelp.py Sphinx plugin to build helpdb_en.jl
stdlib/ Julia standard library documentation
_themes/ Sphinx html themes

File renamed without changes.