Hi Dmitry!

Dmitry Shachnev <mity...@debian.org> writes:

> So the correct link would be this one:
>
> https://www.sphinx-doc.org/en/2.0/extdev/deprecated.html
>
> which says that sphinx.locale.l_() was deprecated in 1.8, and the
> alternative is sphinx.locale._():
>
> https://www.sphinx-doc.org/en/3.x/extdev/i18n.html#sphinx.locale._
>
> Apart from the table of deprecated interfaces, there are no other migration
> docs.
>

Is it really as obvious as it seems?  I feel very naive trusting the
following without having confirmed it's correct via migrations docs.  It
appears to produce identical output to the version of Sphinx in sid
without the patch.  Does this look correct to you?  (I'm ready to
upload)

--- a/docs/elispdomain.py                                                      
+++ b/docs/elispdomain.py                                                      
@@ -8,7 +8,7 @@ Copyright 2014-2019 by Jorgen Schäfer
                                                                               
 from sphinx import addnodes                                                   
 from sphinx.domains import Domain, ObjType                                    
-from sphinx.locale import l_                                                  
+from sphinx.locale import _                                                   
 from sphinx.directives import ObjectDescription                               
 from sphinx.roles import XRefRole                                             
 from sphinx.util.nodes import make_refnode                                    
@@ -106,10 +106,10 @@ class ELispDomain(Domain):
     label = 'ELisp'                                                           
                                                                               
     object_types = {                                                          
-        'function': ObjType(l_('function'), 'function'),                      
-        'variable': ObjType(l_('variable'), 'variable'),                      
-        'command': ObjType(l_('function'), 'command'),                        
-        'option': ObjType(l_('variable'), 'option'),                          
+        'function': ObjType(_('function'), 'function'),                       
+        'variable': ObjType(_('variable'), 'variable'),                       
+        'command': ObjType(_('function'), 'command'),                         
+        'option': ObjType(_('variable'), 'option'),                           
     }                                                                         
     directives = {                                                            
         'function': ELispFunction,


Thanks,
Nicholas

Attachment: signature.asc
Description: PGP signature

Reply via email to