let upgrade_textdomain t k value =
let (current_codeset,current_dir) =
try
MapTextdomain.find k t.textdomains
with Not_found ->
(None,None)
in
let new_value =
match value with
(None,None) -> (current_codeset,current_dir)
| (None,new_dir) -> (current_codeset,new_dir)
| (new_codeset,None) -> (new_codeset,current_dir)
| (new_codeset,new_dir) -> (new_codeset,new_dir)
in
{ t with textdomains = MapTextdomain.add k new_value t.textdomains }