Changeset View
Changeset View
Standalone View
Standalone View
modules/rna_manual_reference.py
| # RNA WIKI REFERENCE | # RNA MANUAL REFERENCE | ||||
| # | # | ||||
| # This file maps RNA to online URL's for right mouse context menu documentation access | # This file maps RNA to online URL's for right mouse context menu documentation access | ||||
| # | # | ||||
| Context not available. | |||||
| # Some Languages have their manual page, using a prefix or | # Some Languages have their manual page, using a prefix or | ||||
| # being preceeded by their respective reference, for example | # being preceeded by their respective reference, for example | ||||
| # | # | ||||
| # Doc:2.6 --> Doc:FR/2.6 | # manual/ --> manual/ru/ | ||||
| # | # | ||||
| # The table in the script, contains all of the languages we have in the | # The table in the script, contains all of the languages we have in the | ||||
| # Blender manual website, for those other languages that still | # Blender manual website, for those other languages that still | ||||
| Context not available. | |||||
| # to the Blender UI translation table | # to the Blender UI translation table | ||||
| # The Blender manual uses a list of ISO_639-1 codes to convert languages to manual prefixes | # The Blender manual uses a list of ISO_639-1 codes to convert languages to manual prefixes | ||||
| # | # | ||||
| # "DANISH": "DK", - Present in the manual, but not present in Blender UI translations table | # "DANISH": "DK", - Not present in the manual, and not present in Blender UI translations table | ||||
| # "FARSI": "FA", - Present in the manual, but not present in Blender UI translations table | # "FARSI": "FA", - Not present in the manual, and not present in Blender UI translations table | ||||
| # "KOREAN": "KO", - Present in the manual, but not present in Blender UI translations table | # "LITHUANIAN": "LT", - Not present in the manual, and not present in Blender UI translations table | ||||
| # "LITHUANIAN": "LT", - Present in the manual, but not present in Blender UI translations table | # "MACEDONIAN": "MK", - Not present in the manual, and not present in Blender UI translations table | ||||
| # "MACEDONIAN": "MK", - Present in the manual, but not present in Blender UI translations table | # "MONGOLIAN": "MN", - Not present in the manual, and not present in Blender UI translations table | ||||
| # "MONGOLIAN": "MN", - Present in the manual, but not present in Blender UI translations table | # "ROMANIAN": "RO", - Not present in the manual, and not present in Blender UI translations table | ||||
| # "ROMANIAN": "RO", - Present in the manual, but not present in Blender UI translations table | |||||
| # | # | ||||
| # "ESTONIAN": "ET", - Present in the manual, as an empty page, not present in UI translations table | |||||
| # | |||||
| # "CROATIAN": "HR", - Present in Blender UI translations table, but without manual | |||||
| # "KYRGYZ": "KY", - Present in Blender UI translations table, but without manual | |||||
| # "NEPALI": "NE", - Present in Blender UI translations table, but without manual | |||||
| # "PERSIAN": "FA", - Present in Blender UI translations table, but without manual | # "PERSIAN": "FA", - Present in Blender UI translations table, but without manual | ||||
mont29: Farsi and Persian are (practically) the same thing. | |||||
Not Done Inline ActionsI am thinking about just removing this a just stating which languages are available for the manual Blendify: I am thinking about just removing this a just stating which languages are available for the… | |||||
| # "HEBREW": "HE", - Present in Blender UI translations table, but without manual | # "HEBREW": "HE", - Present in Blender UI translations table, but without manual | ||||
| # "CROATIAN": "HR", - Present in Blender UI translations table, but without manual | |||||
| # "HUNGARIAN": "HU", - Present in Blender UI translations table, but without manual | # "HUNGARIAN": "HU", - Present in Blender UI translations table, but without manual | ||||
| # "KOREAN": "KO", - Present in Blender UI translations table, but without manual | |||||
| # "KYRGYZ": "KY", - Present in Blender UI translations table, but without manual | |||||
| # "SERBIAN_LATIN": "SR", - Present in Blender UI translations table, but without manual | # "SERBIAN_LATIN": "SR", - Present in Blender UI translations table, but without manual | ||||
| # | # | ||||
| # NOTES: | # NOTES: | ||||
| Context not available. | |||||
| url_manual_prefix = "https://www.blender.org/manual/" | url_manual_prefix = "https://www.blender.org/manual/" | ||||
| # TODO | |||||
| """ | |||||
| LANG = { | LANG = { | ||||
| "ARABIC": "AR", | # "ARABIC": "ar", | ||||
| "BULGARIAN": "BG", | # "BULGARIAN": "bg", | ||||
| "CATALAN": "CA", | # "CATALAN": "ca", | ||||
| "CZECH": "CZ", | # "CZECH": "cz", | ||||
| "GERMAN": "DE", | "GERMAN": "de", | ||||
| "GREEK": "EL", | # "GREEK": "el", | ||||
| "RUSSIAN": "RU", | "RUSSIAN": "ru", | ||||
| "SERBIAN": "SR", | # "SERBIAN": "sr", | ||||
| "SWEDISH": "SV", | # "SWEDISH": "sv", | ||||
| "TURKISH": "TH", | # "TURKISH": "th", | ||||
| "UKRAINIAN": "UK", | # "UKRAINIAN": "uk", | ||||
| "SPANISH": "ES", | # "SPANISH": "es", | ||||
| "FINNISH": "FI", | # "FINNISH": "fi", | ||||
| "FRENCH": "FR", | "FRENCH": "fr", | ||||
| "INDONESIAN": "ID", | # "INDONESIAN": "id", | ||||
| "ITALIAN": "IT", | # "ITALIAN": "it", | ||||
| "JAPANESE": "JA", | # "JAPANESE": "ja", | ||||
| "DUTCH": "NL", | # "DUTCH": "nl", | ||||
| "POLISH": "PL", | # "POLISH": "pl", | ||||
| "PORTUGUESE": "PT", | # "PORTUGUESE": "pt", | ||||
| "BRAZILIANPORTUGUESE": "PT", | # "BRAZILIANPORTUGUESE": "pt", | ||||
| "SIMPLIFIED_CHINESE": "ZH", | "SIMPLIFIED_CHINESE": "zh", | ||||
| "TRADITIONAL_CHINESE": "ZH", | "TRADITIONAL_CHINESE": "zh", | ||||
| }.get(__import__("bpy").context.user_preferences.system.language) | }.get(__import__("bpy").context.user_preferences.system.language) | ||||
| url_manual_prefix = url_manual_prefix \ | url_manual_prefix = url_manual_prefix \ | ||||
| if LANG is None \ | if LANG is None \ | ||||
| else url_manual_prefix.replace("Doc:2.6", "Doc:" + LANG + "/" + "2.6") | else url_manual_prefix.replace("manual", "manual" + LANG + "/") | ||||
Done Inline Actionswould be simpler to do (since we are changing it): if LANG is not None:
url_manual_prefix = url_manual_prefix.replace("manual", "manual/" + LANG)Note that this fixes placement of slash… mont29: would be simpler to do (since we are changing it):
if LANG is not None… | |||||
Not Done Inline ActionsWhen I do that I get: Error calling <function _blender_default_map at 0x000001A19F020AE8>
Traceback (most recent call last):
File "C:\Users\Aaron\Downloads\Blender\blender-2.76-b211e41-win64\blender-2.76.0-git.b211e41-AMD64\2.76\scripts\modules\bpy\utils\__init__.py", line 661, in manual_map
prefix, url_manual_mapping = cb()
File "C:\Users\Aaron\Downloads\Blender\blender-2.76-b211e41-win64\blender-2.76.0-git.b211e41-AMD64\2.76\scripts\modules\bpy\utils\__init__.py", line 639, in _blender_default_map
import rna_manual_reference as ref_mod
File "C:\Users\Aaron\Downloads\Blender\blender-2.76-b211e41-win64\blender-2.76.0-git.b211e41-AMD64\2.76\scripts\addons\modules\rna_manual_reference.py", line 73
if LANG is not None:
^
SyntaxError: invalid syntaxBlendify: When I do that I get:
```
Error calling <function _blender_default_map at 0x000001A19F020AE8>… | |||||
| """ | |||||
| # - The first item is a wildcard - typical file system globbing | # - The first item is a wildcard - typical file system globbing | ||||
| # using python module 'fnmatch.fnmatch' | # using python module 'fnmatch.fnmatch' | ||||
| Context not available. | |||||
Farsi and Persian are (practically) the same thing.