Skip to content
Tcl Source Code View Ticket
Login

View Ticket

introspection of locales

Closed / Invalid737813ffffffffffffffffffffffffffffffffffCreated 24 years agoUpdated 20 years ago
Descriptionplain2003-05-14 18:41:18
It would be useful to be able to query the current
message catalog cache to see what languages were known
to mclocale.

Sicne they are read in, it doesn't seem like it would be
difficult to have a command which returned the list of
what was cached.  If the cache is rebuilt via mcload,
then it would be expected that the new command would
return updated information.
dgpplain2003-05-15 22:06:28
Logged In: YES 
user_id=80530


this request needs some clarification.
What is it you're looking for?  What
locales have loaded entries?  Or what
msg catalog files exist on disk that
could be loaded?  For what module?
Keep in mind that each unit of code
(for example, each package) provides
its own msg catalogs.
lvirdenplain2003-05-15 22:38:49
Logged In: YES 
user_id=15949

Re: clarification

The context is a structure within which one can determine
what languages are supported by a particular command or
commands.  So some way that, for a particular unit of code,
that at runtime one could determine the catalogs available,
would be the goal.
dgpplain2003-05-15 22:44:11
Logged In: YES 
user_id=80530


Well, if you need information about
"a command or commands" it should
be the package that provided those
commands that offers it.  Is there an
additional primitive that msgcat needs
to provide for other packages to implement
such a thing?

Still ambiguous is "available".  Much
like [package names] or [info commands],
the set of catalogs that are "available"
might not be knowable without accessing
the file system.  Do you need to know what's
currently loaded, or what could work?
lvirdenplain2003-05-15 22:46:46
Logged In: YES 
user_id=15949

I believe that knowing what is currently loaded would be
sufficient.
dgpplain2003-05-15 22:50:26
Logged In: YES 
user_id=80530


OK, then, each package just needs to
keep a list of what the [mclocale] was
for each time it called [mcload], and
report that list on request.

I don't see any need for new msgcat
commands to make that possible.
lvirdenplain2003-05-15 23:21:10
Logged In: YES 
user_id=15949

So, for instance, in Tk, a new command would return to the
developer a list of for instance

cs.msg     el.msg     en_gb.msg  fr.msg     nl.msg
de.msg     en.msg     es.msg     it.msg     ru.msg


and then the developer would need to figure out how to map
these names into the languages that they represent.

Should the package also provide a table mapping the names to
languages?
dgpplain2004-12-10 00:57:02
Logged In: YES 
user_id=80530


This has evolved into a request for Tk.
dkf Ticket [737813ffff]: 2 changes [History diff]2006-06-30 15:21:52
dgpplain2006-07-01 03:04:41
Logged In: YES 
user_id=80530


Again, this has become a
request for Tk, and should
be refiled there.
dgp Closed ticket [737813ffff]. [History diff]2006-07-01 03:04:42
Log in (anonymous is fine) to add a comment.