Skip to content

Commit

Permalink
Merge pull request ocaml#3279 from dra27/punctuation
Browse files Browse the repository at this point in the history
Remove French punctuation spacing from messages
  • Loading branch information
AltGr authored Apr 23, 2018
2 parents cda9642 + 39ca614 commit c4e9ea5
Show file tree
Hide file tree
Showing 28 changed files with 64 additions and 64 deletions.
8 changes: 4 additions & 4 deletions src/client/opamAction.ml
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,12 @@ let process_dot_install st nv build_dir =
(fun (src, dst) ->
let src_file = OpamFilename.create (OpamFilename.cwd ()) src.c in
if OpamFilename.exists dst
&& OpamConsole.confirm "Overwriting %s ?" (OpamFilename.to_string dst) then
&& OpamConsole.confirm "Overwriting %s?" (OpamFilename.to_string dst) then
OpamFilename.install ~src:src_file ~dst ()
else begin
OpamConsole.msg "Installing %s to %s.\n"
(OpamFilename.Base.to_string src.c) (OpamFilename.to_string dst);
if OpamConsole.confirm "Continue ?" then
if OpamConsole.confirm "Continue?" then
OpamFilename.install ~src:src_file ~dst ()
end
) (I.misc install);
Expand Down Expand Up @@ -537,7 +537,7 @@ let remove_package_aux
List.iter (fun (_,dst) ->
if OpamFilename.exists dst then begin
OpamConsole.msg "Removing %s." (OpamFilename.to_string dst);
if OpamConsole.confirm "Continue ?" then
if OpamConsole.confirm "Continue?" then
OpamFilename.remove dst
end
) (OpamFile.Dot_install.misc install);
Expand Down Expand Up @@ -710,7 +710,7 @@ let build_package t ?(test=false) ?(doc=false) build_dir nv =
Done None

(* Assumes the package has already been compiled in its build dir.
Does not register the installation in the metadata ! *)
Does not register the installation in the metadata! *)
let install_package t ?(test=false) ?(doc=false) ?build_dir nv =
let opam = OpamSwitchState.opam t nv in
let commands =
Expand Down
2 changes: 1 addition & 1 deletion src/client/opamAdminCommand.ml
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@ let filter_command =
let packages =
if remove then packages else OpamPackage.Set.Op.(st.packages -- packages)
in
if not (dryrun || OpamConsole.confirm "Confirm ?") then
if not (dryrun || OpamConsole.confirm "Confirm?") then
OpamStd.Sys.exit_because `Aborted
else
let repo = OpamRepositoryBackend.local repo_root in
Expand Down
2 changes: 1 addition & 1 deletion src/client/opamAdminRepoUpgrade.ml
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ let do_upgrade repo_root =
(FOp (FIdent ([],OpamVariable.of_string "sys-ocaml-version",None),
`Eq,
FString (OpamPackage.Version.to_string nv.version)))
(* add depext towards an 'ocaml' package ? *)
(* add depext towards an 'ocaml' package? *)
in
write_opam ~add_files:[conf_script_name^".in", system_conf_script]
system_opam
Expand Down
6 changes: 3 additions & 3 deletions src/client/opamAuxCommands.ml
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ let get_compatible_compiler ?repos ?locked rt dir =
"The following local packages don't appear to be installable:\n%s"
(OpamStd.Format.itemize OpamPackage.to_string
(OpamPackage.Set.elements local_packages));
if OpamConsole.confirm "Do you want to create an empty switch nonetheless ?"
if OpamConsole.confirm "Do you want to create an empty switch regardless?"
then []
else OpamStd.Sys.exit_because `Aborted)
else
Expand All @@ -488,7 +488,7 @@ let get_compatible_compiler ?repos ?locked rt dir =
if OpamClientConfig.(!r.show) ||
OpamConsole.confirm
"Create the switch with no specific compiler selected, and attempt to \
continue anyway ?"
continue?"
then []
else OpamStd.Sys.exit_because `Aborted
| Failure _ ->
Expand All @@ -515,6 +515,6 @@ let get_compatible_compiler ?repos ?locked rt dir =
(OpamFormula.to_string default_compiler)
(OpamFilename.Dir.to_string dir);
if OpamConsole.confirm
"Continue anyway, with no specific compiler selected ?"
"Proceed, with no specific compiler selected?"
then []
else OpamStd.Sys.exit_because `Aborted
8 changes: 4 additions & 4 deletions src/client/opamClient.ml
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ let compute_upgrade_t
let to_install =
if not_installed = [] then [] else
if auto_install ||
OpamConsole.confirm "%s %s not installed. Install %s ?"
OpamConsole.confirm "%s %s not installed. Install %s?"
(OpamStd.Format.pretty_list
(List.rev_map OpamFormula.short_string_of_atom not_installed))
(match not_installed with [_] -> "is" | _ -> "are")
Expand Down Expand Up @@ -699,7 +699,7 @@ let init
if not root_empty then (
OpamConsole.warning "%s exists and is not empty"
(OpamFilename.Dir.to_string root);
if not (OpamConsole.confirm "Proceed ?") then
if not (OpamConsole.confirm "Proceed?") then
OpamStd.Sys.exit_because `Aborted);
try
(* Create the content of ~/.opam/config *)
Expand Down Expand Up @@ -1054,7 +1054,7 @@ let reinstall_t t ?ask ?(force=false) atoms =
if not_installed <> [] then
if
force ||
OpamConsole.confirm "%s %s not installed. Install %s ?"
OpamConsole.confirm "%s %s not installed. Install %s?"
(OpamStd.Format.pretty_list
(List.rev_map OpamFormula.short_string_of_atom not_installed))
(match not_installed with [_] -> "is" | _ -> "are")
Expand Down Expand Up @@ -1158,7 +1158,7 @@ module PIN = struct
match pin_nv with
| Some nv ->
if OpamConsole.confirm
"Package %s is not pinned. Edit as a new pinning to version %s ?"
"Package %s is not pinned. Edit as a new pinning to version %s?"
(OpamPackage.Name.to_string name)
(OpamPackage.version_to_string nv)
then
Expand Down
12 changes: 6 additions & 6 deletions src/client/opamCommands.ml
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ let init =
if OpamConsole.confirm
"Using configuration file from %s. \
Please verify the following SHA256:\n %s\n\
Is this correct ?"
Is this correct?"
(OpamUrl.to_string url) (OpamHash.contents hash)
then OpamFile.make f
else OpamStd.Sys.exit_because `Aborted
Expand Down Expand Up @@ -1336,8 +1336,8 @@ let reinstall =
let upstream = OpamPackage.Map.find nv st.opams in
if not (OpamFile.OPAM.effectively_equal installed upstream) &&
OpamConsole.confirm
"Metadata of %s was updated. Force-update, without performing \
the reinstallation ?" (OpamPackage.to_string nv)
"Metadata of %s were updated. Force-update, without performing \
the reinstallation?" (OpamPackage.to_string nv)
then OpamSwitchAction.install_metadata st nv
with Not_found -> ())
to_forget;
Expand Down Expand Up @@ -1618,8 +1618,8 @@ let repository =
| `Current_switch ->
match OpamStateConfig.get_switch_opt () with
| None ->
OpamConsole.warning "No switch is currently set, maybe you meant \
'--set-default' ?";
OpamConsole.warning "No switch is currently set, perhaps you meant \
'--set-default'?";
acc
| Some sw ->
if List.mem sw acc then acc
Expand Down Expand Up @@ -2405,7 +2405,7 @@ let pin ?(unpin_only=false) () =
let names = match names with
| _::_::_ ->
if OpamConsole.confirm
"This will pin the following packages: %s. Continue ?"
"This will pin the following packages: %s. Continue?"
(OpamStd.List.concat_map ", " OpamPackage.Name.to_string names)
then names
else OpamStd.Sys.exit_because `Aborted
Expand Down
2 changes: 1 addition & 1 deletion src/client/opamListCommand.ml
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ let field_of_string =
(if not (OpamStd.String.ends_with ~suffix:":" s) &&
List.mem_assoc s (OpamFile.OPAM.fields)
then Printf.sprintf ". Did you mean the opam field \"%s:\" \
(with a colon) ?" s
(with a colon)?" s
else "")

let version_color st nv =
Expand Down
16 changes: 8 additions & 8 deletions src/client/opamPinCommand.ml
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ let edit_raw name temp_file =
| ws ->
OpamConsole.warning "The opam file didn't pass validation:";
OpamConsole.errmsg "%s\n" (OpamFileTools.warns_to_string ws);
if OpamConsole.confirm "Continue anyway ('no' will reedit) ?"
if OpamConsole.confirm "Proceed anyway ('no' will re-edit)?"
then Some opam
else edit ()
with e ->
Expand All @@ -186,7 +186,7 @@ let edit_raw name temp_file =
| Failure _ -> ()
| e -> OpamConsole.error "%s" (Printexc.to_string e));
if OpamStd.Sys.tty_in &&
OpamConsole.confirm "Errors in %s, retry editing ?"
OpamConsole.confirm "Errors in %s, edit again?"
(OpamFile.to_string temp_file)
then edit ()
else None
Expand Down Expand Up @@ -278,7 +278,7 @@ let edit st ?version name =
if (current_opam >>| fun o ->
OpamFile.OPAM.equal (clean_opam opam) (clean_opam o))
<> Some true &&
OpamConsole.confirm "Save the new opam file back to %S ?"
OpamConsole.confirm "Save the new opam file back to %S?"
(OpamFile.to_string src_opam) then
OpamFile.OPAM.write_with_preserved_format src_opam
(clean_opam opam)
Expand Down Expand Up @@ -316,7 +316,7 @@ let version_pin st name version =
(OpamPath.Switch.Overlay.package root st.switch name))
else OpamConsole.note "Pinning unchanged")
else if OpamConsole.confirm
"Package %s is already %s. Unpin and continue ?"
"Package %s is already %s. Unpin and continue?"
(OpamPackage.Name.to_string name)
(string_of_pinned opam)
then
Expand Down Expand Up @@ -358,7 +358,7 @@ let rec handle_pin_depends st nv opam =
(OpamConsole.colorise `bold (OpamPackage.to_string nv))
(OpamConsole.colorise `underline (OpamUrl.to_string url)))
extra_pins);
if not (OpamConsole.confirm "Continue ?") then
if not (OpamConsole.confirm "Continue?") then
(OpamConsole.msg "You can specify --ignore-pin-depends to bypass\n";
OpamStd.Sys.exit_because `Aborted);
List.fold_left (fun st (nv, url) ->
Expand Down Expand Up @@ -394,7 +394,7 @@ and source_pin
(if no_changes then "already" else "currently")
(string_of_pinned cur_opam);
if no_changes then ()
else (* if OpamConsole.confirm "Proceed and change pinning target ?" then *)
else (* if OpamConsole.confirm "Proceed and change pinning target?" then *)
OpamFilename.remove
(OpamFile.filename
(OpamPath.Switch.Overlay.tmp_opam
Expand All @@ -407,7 +407,7 @@ and source_pin
"Package %s is part of the base packages of this compiler."
(OpamPackage.Name.to_string name);
if not @@ OpamConsole.confirm
"Are you sure you want to override this and pin it anyway ?"
"Are you sure you want to override this and pin it anyway?"
then raise Aborted
);
let version = default_version st name in
Expand All @@ -417,7 +417,7 @@ and source_pin
if not (OpamPackage.has_name st.packages name) &&
opam_opt = None &&
not (OpamConsole.confirm
"Package %s does not exist, create as a %s package ?"
"Package %s does not exist, create as a %s package?"
(OpamPackage.Name.to_string name)
(OpamConsole.colorise `bold "NEW"))
then raise Aborted;
Expand Down
2 changes: 1 addition & 1 deletion src/client/opamRepositoryCommand.ml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ let add rt name url trust_anchors =
= None &&
not (OpamConsole.confirm
"%S doesn't contain a \"packages\" directory.\n\
Is it really the directory of your repo ?"
Is it really the directory of your repo?"
(OpamUrl.to_string url))
then OpamStd.Sys.exit_because `Aborted;
OpamProcess.Job.run (OpamRepository.init root name);
Expand Down
6 changes: 3 additions & 3 deletions src/client/opamSolution.ml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ let atoms_of_packages set =
List.rev_map (fun n -> n, None)
(OpamPackage.Name.Set.elements (OpamPackage.names_of_packages set))

(* unused ?
(* unused?
let atom_of_name name =
name, None
*)
Expand Down Expand Up @@ -730,7 +730,7 @@ let confirmation ?ask requested solution =
OpamCoreConfig.(!r.answer = Some true) ||
match ask with
| Some false -> true
| Some true -> OpamConsole.confirm "Do you want to continue ?"
| Some true -> OpamConsole.confirm "Do you want to continue?"
| None ->
let open PackageActionGraph in
let solution_packages =
Expand All @@ -739,7 +739,7 @@ let confirmation ?ask requested solution =
solution
OpamPackage.Name.Set.empty in
OpamPackage.Name.Set.equal requested solution_packages
|| OpamConsole.confirm "Do you want to continue ?"
|| OpamConsole.confirm "Do you want to continue?"

let run_hook_job t name ?(local=[]) w =
let shell_env = OpamEnv.get_full ~force_path:true t in
Expand Down
10 changes: 5 additions & 5 deletions src/client/opamSwitchCommand.ml
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ let remove gt ?(confirm = true) switch =
);
if not confirm ||
OpamConsole.confirm
"Switch %s and all its packages will be wiped. Are you sure ?"
"Switch %s and all its packages will be wiped. Are you sure?"
(OpamSwitch.to_string switch)
then
clear_switch gt switch
Expand Down Expand Up @@ -221,7 +221,7 @@ let install_compiler_packages t atoms =
if not (OpamPackage.Set.is_empty non_comp) &&
not (OpamConsole.confirm ~default:false
"Packages %s don't have the 'compiler' flag set. Are you sure \
you want to set them as the compiler base for this switch ?"
you want to set them as the compiler base for this switch?"
(OpamPackage.Set.to_string non_comp))
then
OpamConsole.error_and_exit `Aborted
Expand Down Expand Up @@ -317,7 +317,7 @@ let install gt ?rt ?synopsis ?repos ~update_config ~packages switch =
OpamConsole.warning "Switch %s left partially installed"
(OpamSwitch.to_string switch);
raise e);
if OpamConsole.confirm "Switch initialisation failed, clean up ? \
if OpamConsole.confirm "Switch initialisation failed: clean up? \
('n' will leave the switch partially installed)"
then ignore (clear_switch gt switch));
raise e
Expand All @@ -338,7 +338,7 @@ let switch lock gt switch =
else
OpamConsole.error_and_exit `Not_found
"No switch %s is currently installed. Did you mean \
'opam switch create %s' ?\n\
'opam switch create %s'?\n\
Installed switches are:\n%s"
(OpamSwitch.to_string switch) (OpamSwitch.to_string switch)
(OpamStd.Format.itemize OpamSwitch.to_string installed_switches)
Expand Down Expand Up @@ -563,7 +563,7 @@ let set_compiler st namesv =
"These packages are not installed:\n%s"
(OpamStd.List.concat_map ", " OpamPackage.to_string uninstalled);
if not (OpamConsole.confirm
"Set them as compilers at the proposed versions anyways ?")
"Set them as compilers at the proposed versions regardless?")
then OpamStd.Sys.exit_because `Aborted);
let st = { st with compiler_packages = OpamPackage.Set.of_list packages } in
OpamSwitchAction.write_selections st;
Expand Down
6 changes: 3 additions & 3 deletions src/core/opamFilename.mli
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ val copy_dir: src:Dir.t -> dst:Dir.t -> unit
(** Link a directory *)
val link_dir: target:Dir.t -> link:Dir.t -> unit

(** Does the directory exist ? *)
(** Does the directory exist? *)
val exists_dir: Dir.t -> bool

(** Returns the argument as option, if the directory exists *)
Expand Down Expand Up @@ -166,12 +166,12 @@ val move: src:t -> dst:t -> unit
(** Read a symlinked file *)
val readlink: t -> t

(** Is a symlink ? *)
(** Is a symlink? *)
val is_symlink: t -> bool

val is_symlink_dir: Dir.t -> bool

(** Is an executable ? *)
(** Is an executable? *)
val is_exec: t -> bool

(** Copy a file *)
Expand Down
4 changes: 2 additions & 2 deletions src/core/opamProcess.mli
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,10 @@ val dry_wait_one: t list -> t * result
(** Send SIGINT to a process (or SIGKILL on Windows) *)
val interrupt: t -> unit

(** Is the process result a success ? *)
(** Is the process result a success? *)
val is_success : result -> bool

(** Is the process result a failure ? *)
(** Is the process result a failure? *)
val is_failure : result -> bool

(** Should be called after process termination, to cleanup temporary files.
Expand Down
2 changes: 1 addition & 1 deletion src/format/opamFormula.mli
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
(** Formulas on packages, opt. with sub-formulas on versions, and conversion
functions *)

(** binary operations (compatible with the Dose type for Cudf operators !) *)
(** binary operations (compatible with the Dose type for Cudf operators!) *)
type relop = OpamParserTypes.relop (* = [ `Eq | `Neq | `Geq | `Gt | `Leq | `Lt ] *)

(** Version constraints for OPAM *)
Expand Down
2 changes: 1 addition & 1 deletion src/format/opamPackage.mli
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ val max_version: Set.t -> Name.t -> t
(** Compare two packages *)
val compare: t -> t -> int

(** Are two packages equal ? *)
(** Are two packages equal? *)
val equal: t -> t -> bool

(** Hash a package *)
Expand Down
4 changes: 2 additions & 2 deletions src/repository/opamLocal.ml
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,8 @@ module B = struct
else
Not_available
(Printf.sprintf
"Could not find target file %s after rsync of %s. \
Maybe you meant %s/ ?"
"Could not find target file %s after rsync with %s. \
Perhaps you meant %s/ ?"
(OpamUrl.basename remote_url)
(OpamUrl.to_string remote_url)
(OpamUrl.to_string remote_url))
Expand Down
4 changes: 2 additions & 2 deletions src/repository/opamRepository.ml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ let fetch_from_cache =
fun cache_dir cache_urls checksums ->
let mismatch file =
OpamConsole.error
"Conflicting file hashes, or broken or compromised cache !\n%s"
"Conflicting file hashes, or broken or compromised cache!\n%s"
(OpamStd.Format.itemize (fun ck ->
OpamHash.to_string ck ^
if OpamHash.check_file (OpamFilename.to_string file) ck
Expand Down Expand Up @@ -151,7 +151,7 @@ let validate_and_add_to_cache label url cache_dir file checksums =
(match cache_dir, checksums with
| Some dir, ck::_ ->
OpamFilename.copy ~src:file ~dst:(cache_file dir ck)
(* idea: hardlink to the other checksums ? *)
(* idea: hardlink to the other checksums? *)
| _ -> ());
true

Expand Down
Loading

0 comments on commit c4e9ea5

Please sign in to comment.