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

copying useless files from wx/locale folder in binary installation. #4217

Closed
nvaccessAuto opened this issue Jun 23, 2014 · 6 comments
Closed

Comments

@nvaccessAuto
Copy link

Reported by dhankuta on 2014-06-23 09:25
currently, In nvda/locale folder; the language list contains all the languages having nvda.mo, *.dic and wxstd.mo from wx/locale.
The copying of wxstd.mo from wx/locale has a sense of meaning if and only if the same language locale of nvda is available. Right now, the lang list in general setting dialog and the language list on nvda/locale folder do not match; thus creating a confusion. Though no errorful action on operation; it is senseless to put the junk of *lang/lc_messages/wxstd.mo of those languages without nvda translation.
module: setup.py
current source codes:

def getLocaleDataFiles():
NVDALocaleFiles=[(f,)) for f in glob("locale//LC_MESSAGES/.mo")+glob("locale//.dic")](%28os.path.dirname%28f%29,%29
wxDir=wx.path[%28f,%29) for f in glob(wxDir+"/locale//LC_MESSAGES/.mo")](0]
wxLocaleFiles=[(os.path.dirname(f)[len(wxDir)+1:],)
NVDALocaleGestureMaps=[(f,)) for f in glob("locale/*/gestures.ini")]((os.path.dirname(f),)
return NVDALocaleFiles+wxLocaleFiles+NVDALocaleGestureMaps

Proposed patch:

def getLocaleDataFiles():
wxDir=wx.path[f in glob("locale/*/LC_MESSAGES"):
nvdaMoFiles.append((f, (f+"\nvda.mo",)))
if os.path.isfile(wxDir+""+f+"\wxstd.mo"):
wxMoFiles.append((f, (wxDir+""+f+"\wxstd.mo",)))

localeMoFiles = nvdaMoFiles+wxMoFiles
localeDicFiles=[(os.path.dirname(f), (f,)) for f in glob("locale/*/*.dic")](0]
nvdaMoFiles=[]
wxMoFiles=[]
for)
localeGestureMaps=[(f,)) for f in glob("locale/*/gestures.ini")]((os.path.dirname(f),)
return localeMoFiles+localeDicFiles+localeGestureMaps

Him Prasad Gautam.
Blocked by #4847

@nvaccessAuto
Copy link
Author

Comment 2 by Michael Curran <mick@... on 2015-01-26 05:32
In [856549e]:

Merge branch 't4217' into next. Incubates #4217

Changes:
Added labels: incubating

@nvaccessAuto
Copy link
Author

Comment 3 by mdcurran on 2015-01-26 05:34
Thanks for the patch. Now in branch t4217 incubating. Patch was changed a little bit, to remove an unnecessary variable, to use os.path.join, and to not calculate each wx mo file path twice.

@nvaccessAuto
Copy link
Author

Comment 5 by Michael Curran <mick@... on 2015-01-29 04:56
In [51efe0a]:

When copying wx locale files for any language that NVDA has a translation for, fall back to the language if no wx locale file exists for language_COUNTRY. E.g. NVDA support pt_PT, but wx only has a locale for pt. Fixes #4847 Re #4217

@nvaccessAuto
Copy link
Author

Comment 6 by Michael Curran <mick@... on 2015-01-29 04:57
In [f54b4b8]:

Merge branch 't4217' into next. Incubates #4217

@nvaccessAuto
Copy link
Author

Comment 8 by Michael Curran <mick@... on 2015-03-16 05:48
In [03768f5]:

Merge branch 't4217'. Fixes #4217

Changes:
Removed labels: incubating
State: closed

@nvaccessAuto
Copy link
Author

Comment 9 by mdcurran on 2015-03-16 22:40
Changes:
Milestone changed from None to 2015.2

@nvaccessAuto nvaccessAuto added this to the 2015.2 milestone Nov 10, 2015
michaelDCurran added a commit that referenced this issue Nov 23, 2015
…tion for, fall back to the language if no wx locale file exists for language_COUNTRY. E.g. NVDA support pt_PT, but wx only has a locale for pt. Fixes #4847 Re #4217
michaelDCurran added a commit that referenced this issue Nov 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant